fix(Vehicles): adding createdAt field

This commit is contained in:
Josepablo C
2024-04-06 17:44:42 -06:00
parent 874abaacd2
commit e904c83cb5

View File

@@ -51,6 +51,7 @@ const schema = new Schema({
last_location_lng: { type: String },
last_location_geo: { type: pointSchema },
last_location_time: { type: Date },
createdAt: { type : Date, required : true, default : () => { return Date.now(); } }
});
module.exports = mongoose.model( "vehicles", schema );