forked from Yara724/api
Added expert field mirror flow
This commit is contained in:
24
src/features/user/schemas/otp.schema.ts
Normal file
24
src/features/user/schemas/otp.schema.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
|
||||
import { HydratedDocument } from "mongoose";
|
||||
|
||||
export type OtpDocument = HydratedDocument<Otp>;
|
||||
|
||||
@Schema({ _id: false })
|
||||
export class Otp {
|
||||
@Prop()
|
||||
hash: string;
|
||||
|
||||
@Prop()
|
||||
salt: string;
|
||||
|
||||
@Prop()
|
||||
expiresAt: Date;
|
||||
|
||||
@Prop({ default: 0 })
|
||||
attempts: number;
|
||||
|
||||
@Prop({ default: Date.now })
|
||||
generatedAt: Date;
|
||||
}
|
||||
|
||||
export const OtpSchema = SchemaFactory.createForClass(Otp);
|
||||
Reference in New Issue
Block a user