fix: 后端还有俩文件落下了

This commit is contained in:
2025-12-17 23:02:23 +08:00
parent e6fad12b30
commit ca527e997d
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
@Entity()
@Index('IDX_SMS_PHONE_TYPE', ['phone', 'type'])
@Index('IDX_SMS_EXPIRED', ['expiredAt'])
export class SmsRecord {
@PrimaryGeneratedColumn('identity')
id: number;
@Column()
phone: string;
@Column()
type: string;
@Column()
code: string;
@Column({ type: 'smallint', default: 0 })
tryCount: number;
@CreateDateColumn({ precision: 3 })
createdAt: Date;
@Column({ type: 'timestamp with time zone', precision: 3 })
expiredAt: Date;
@Column({ type: 'timestamp with time zone', precision: 3, nullable: true })
usedAt: Date;
}