discord-multipurpose-bot/models/VerificationCode.js
2024-08-31 02:34:09 +01:00

10 lines
407 B
JavaScript

const mongoose = require("mongoose");
const VerificationCodeSchema = new mongoose.Schema({
userId: { type: String, required: true },
email: { type: String, required: true },
code: { type: String, required: true },
createdAt: { type: Date, expires: "10m", default: Date.now }, // Code expires in 10 minutes
});
module.exports = mongoose.model("VerificationCode", VerificationCodeSchema);