fix(Vehicles): adding createdAt field
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user