2022-02-03 10:06:44 -06:00
|
|
|
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
|
|
|
|
|
|
|
|
@Entity('users')
|
|
|
|
|
export class UserEntity {
|
|
|
|
|
@PrimaryGeneratedColumn('uuid')
|
2022-06-25 19:53:06 +02:00
|
|
|
id!: string;
|
2022-02-03 10:06:44 -06:00
|
|
|
|
2022-07-04 20:20:43 +01:00
|
|
|
@Column({ default: '' })
|
2022-06-25 19:53:06 +02:00
|
|
|
firstName!: string;
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-07-04 20:20:43 +01:00
|
|
|
@Column({ default: '' })
|
2022-06-25 19:53:06 +02:00
|
|
|
lastName!: string;
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-07-04 20:20:43 +01:00
|
|
|
@Column({ default: false })
|
2022-06-25 19:53:06 +02:00
|
|
|
isAdmin!: boolean;
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-02-03 10:06:44 -06:00
|
|
|
@Column()
|
2022-06-25 19:53:06 +02:00
|
|
|
email!: string;
|
2022-02-03 10:06:44 -06:00
|
|
|
|
|
|
|
|
@Column({ select: false })
|
2022-06-25 19:53:06 +02:00
|
|
|
password?: string;
|
2022-02-03 10:06:44 -06:00
|
|
|
|
|
|
|
|
@Column({ select: false })
|
2022-06-25 19:53:06 +02:00
|
|
|
salt?: string;
|
2022-02-03 10:06:44 -06:00
|
|
|
|
2022-07-04 20:20:43 +01:00
|
|
|
@Column({ default: '' })
|
2022-06-25 19:53:06 +02:00
|
|
|
profileImagePath!: string;
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-07-04 20:20:43 +01:00
|
|
|
@Column({ default: true })
|
2022-06-27 15:13:07 -05:00
|
|
|
shouldChangePassword!: boolean;
|
2022-05-21 02:23:55 -05:00
|
|
|
|
2022-02-03 10:06:44 -06:00
|
|
|
@CreateDateColumn()
|
2022-06-25 19:53:06 +02:00
|
|
|
createdAt!: string;
|
2022-02-03 10:06:44 -06:00
|
|
|
}
|