add: progress authentication
This commit is contained in:
@@ -1,45 +1,25 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
VersionColumn,
|
||||
CreateDateColumn,
|
||||
PrimaryGeneratedColumn, BeforeInsert,
|
||||
} from 'typeorm';
|
||||
import { BaseModel } from '../../config/basemodel.entity';
|
||||
import { hashPassword } from '../../helper/hash_password';
|
||||
|
||||
@Entity()
|
||||
export class User {
|
||||
export class User extends BaseModel {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column()
|
||||
firstName: string;
|
||||
username: string;
|
||||
|
||||
@Column()
|
||||
lastName: string;
|
||||
password: string;
|
||||
|
||||
@Column()
|
||||
salt: string;
|
||||
|
||||
@Column({ default: true })
|
||||
isActive: boolean;
|
||||
|
||||
@CreateDateColumn({
|
||||
type: 'timestamp with time zone',
|
||||
nullable: false,
|
||||
})
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({
|
||||
type: 'timestamp with time zone',
|
||||
nullable: false,
|
||||
})
|
||||
updatedAt: Date;
|
||||
|
||||
@DeleteDateColumn({
|
||||
type: 'timestamp with time zone',
|
||||
nullable: true,
|
||||
})
|
||||
deletedAt: Date;
|
||||
|
||||
@VersionColumn()
|
||||
version: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user