add auth roles and guards 050220
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
Index,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity('auth_otps')
|
||||
export class AuthOtpEntity {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id!: string;
|
||||
|
||||
@Index()
|
||||
@Column({ length: 20 })
|
||||
mobile!: string;
|
||||
|
||||
@Column({ length: 128 })
|
||||
codeHash!: string;
|
||||
|
||||
@Column({ type: 'timestamptz' })
|
||||
expiresAt!: Date;
|
||||
|
||||
@Column({ type: 'timestamptz', nullable: true })
|
||||
consumedAt!: Date | null;
|
||||
|
||||
@Column({ type: 'int', default: 0 })
|
||||
attempts!: number;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user