📜  忘记 mot de passe api nodejs mongodb 示例 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:09.234000             🧑  作者: Mango

代码示例1
const mongoose = require('mongoose');


const resettokenSchema = new mongoose.Schema({
_userId: { type: mongoose.Schema.Types.ObjectId, required: true, ref: 'User' },
resettoken: { type: String, required: true },
createdAt: { type: Date, required: true, default: Date.now, expires: 43200 },
});


module.exports = mongoose.model('passwordResetToken', resettokenSchema);