mirror of
https://github.com/theoludwig/p61-project.git
synced 2024-07-17 07:00:12 +02:00
20 lines
496 B
TypeScript
20 lines
496 B
TypeScript
|
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
|
||
|
}
|
||
|
}
|