1
1
mirror of https://github.com/theoludwig/p61-project.git synced 2024-07-17 07:00:12 +02:00
p61-project/domain/entities/User.ts

20 lines
496 B
TypeScript
Raw Normal View History

2024-03-15 22:48:28 +01:00
import type { EntityOptions } from "./_Entity"
import { Entity } from "./_Entity"
export interface UserOptions extends EntityOptions {
email: string
displayName: string
}
export class User extends Entity implements UserOptions {
public email: UserOptions["email"]
public displayName: UserOptions["displayName"]
public constructor(options: UserOptions) {
const { id, email, displayName } = options
super({ id })
this.email = email
this.displayName = displayName
}
}