add auth roles and guards 050220

This commit is contained in:
2026-05-11 12:40:42 +03:30
parent 03ac02bee9
commit 3e5543a548
29 changed files with 924 additions and 30 deletions
+32
View File
@@ -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;
}