mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 02:15:21 +00:00
authentication module done
This commit is contained in:
41
libs/common/src/modules/user/entities/user.entity.ts
Normal file
41
libs/common/src/modules/user/entities/user.entity.ts
Normal file
@ -0,0 +1,41 @@
|
||||
import { Column, Entity } from 'typeorm';
|
||||
import { UserDto } from '../dtos';
|
||||
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
|
||||
|
||||
@Entity({ name: 'user' })
|
||||
export class UserEntity extends AbstractEntity<UserDto> {
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
public uuid: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
})
|
||||
email: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
public password: string;
|
||||
|
||||
@Column()
|
||||
public firstName: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
public lastName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
default: false,
|
||||
})
|
||||
public isUserVerified: boolean;
|
||||
|
||||
constructor(partial: Partial<UserEntity>) {
|
||||
super();
|
||||
Object.assign(this, partial);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user