1const mongoose = require('mongoose');
2
3
4const resettokenSchema = new mongoose.Schema({
5_userId: { type: mongoose.Schema.Types.ObjectId, required: true, ref: 'User' },
6resettoken: { type: String, required: true },
7createdAt: { type: Date, required: true, default: Date.now, expires: 43200 },
8});
9
10
11module.exports = mongoose.model('passwordResetToken', resettokenSchema);