flexbiz-server
Version:
Flexible Server
3 lines (2 loc) • 957 B
JavaScript
const khachHangTuongTacSchema=new Schema({id_app:{type:String,required:!0},ma_kh:{type:String,required:!0,index:!0},hinh_thuc:{type:String},ma_dt:{type:String},noi_dung:{type:String,required:!0},nhu_cau:{type:String},muc_do_quan_tam:{type:String},ngay_cham_soc:{type:Date,default:Date.now},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&&(khachHangTuongTacSchema.index({id_app:1,ma_kh:1}),khachHangTuongTacSchema.index({id_app:1,ngay_cham_soc:1}),khachHangTuongTacSchema.index({id_app:1,muc_do_quan_tam:1}),khachHangTuongTacSchema.index({id_app:1,hinh_thuc:1}),khachHangTuongTacSchema.index({id_app:1,ma_dt:1}),khachHangTuongTacSchema.index({id_app:1,date_created:-1}));module.exports=mongoose.models.customer_care||mongoose.model("customer_care",khachHangTuongTacSchema);