flexbiz-server
Version:
Flexible Server
3 lines (2 loc) • 806 B
JavaScript
;const checkinlocationSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},id_link:String,location:Schema.Types.Mixed,hinh_anh:String,ghi_chu:String,exfields:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""}});
(global.configs||{}).createIndexes&&(checkinlocationSchema.index({id_app:1}),checkinlocationSchema.index({id_link:1}),checkinlocationSchema.index({date_created:-1}),checkinlocationSchema.index({status:1}),checkinlocationSchema.index({user_created:1,visible_to:1,visible_to_users:1}));const model=mongoose.models.checkinlocation||mongoose.model("checkinlocation",checkinlocationSchema);module.exports=model;