There is a particular task I want to accomplish, but I am not finding any particular way to do that. Let\'s say I have an app that is used to send mails. I keep a record of thes
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
let PassWordReSate = new Schema(
{
hex: String,
email: String,
},
{
collection: "PassWordReSate",
timestamps: true,
}
);
PassWordReSate.path("createdAt").index({ expires: 6 });
module.exports = mongoose.model("PassWordReSate", PassWordReSate);