File: /var/www/api-management/src/app/auth/schemas/reset-password-token.schema.ts
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document, Types } from 'mongoose';
import { User } from '../../user/schemas/user.schema';
@Schema()
export class ResetPasswordToken extends Document {
@Prop({ required: true })
token: string;
@Prop({ type: Types.ObjectId, ref: User.name, required: true })
user: Types.ObjectId;
@Prop({ required: true })
expiresAt: Date;
}
export const ResetPasswordTokenSchema =
SchemaFactory.createForClass(ResetPasswordToken);