【发布时间】:2020-01-10 05:56:11
【问题描述】:
我正在寻找一种方法来查询在 mongoose 中 X 分钟之前创建的文档。
这是我的架构。
const UserSchema = new mongoose.Schema({
username: {
type: String,
minlength: 6,
maxlength: 18,
match: /^[A-Za-z0-9]+(?:[_-][A-Za-z0-9]+)*$/,
unique : true,
required: true,
trim: true,
},
}, {timestamps:true})
【问题讨论】:
标签: javascript mongodb mongoose