replace all created to timestamps: true in db

This commit is contained in:
Wentao Lyu 2023-03-13 05:20:35 +08:00
parent 5d65427a6e
commit dd1f74da72
4 changed files with 11 additions and 22 deletions

View file

@ -12,11 +12,7 @@ const customGptSchema = mongoose.Schema({
type: String,
required: true
},
created: {
type: Date,
default: Date.now
}
});
}, { timestamps: true });
const CustomGpt = mongoose.models.CustomGpt || mongoose.model('CustomGpt', customGptSchema);