Files
Checkmate/Server/db/models/RecoveryToken.js
T

25 lines
377 B
JavaScript
Raw Normal View History

2024-10-15 11:57:37 +08:00
import mongoose from "mongoose";
const RecoveryTokenSchema = mongoose.Schema(
2024-10-17 12:07:30 +08:00
{
email: {
type: String,
required: true,
unique: true,
},
token: {
type: String,
required: true,
},
expiry: {
type: Date,
default: Date.now,
expires: 600,
},
},
{
timestamps: true,
}
);
2024-10-15 11:57:37 +08:00
export default mongoose.model("RecoveryToken", RecoveryTokenSchema);