flexbiz-server
Version:
Flexible Server
5 lines (4 loc) • 1.72 kB
JavaScript
;const asswithdrawSchema=new Schema({id_app:String,creator:{type:String,required:!0,trim:!0},id:{type:String,trim:!0},token:{type:String,required:!0,lowercase:!0,trim:!0},product_owner:String,so_luong:{type:Number,required:!0},gia:{type:Number,default:0},von:{type:Number,default:0},lai_cam_ket:{type:Number,default:0},lai_thuong:{type:Number,default:0},lai_suat_truoc_han:{type:Number,default:0},lai_truoc_han:{type:Number,default:0},so_ngay_tinh_lai:{type:Number,default:0},ngay:{type:Date},
denom:{type:String,lowercase:!0,required:!0,trim:!0},tg_xu_ly_rut_von:{type:Number,default:0},ngay_xu_ly:{type:Date},da_rut_von:Boolean,trang_thai:{type:String,default:"0"},signature: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:""}}),model=mongoose.models.asswithdraw||mongoose.model("asswithdraw",asswithdrawSchema);
(global.configs||{}).createIndexes&&(asswithdrawSchema.index({id_app:1}),asswithdrawSchema.index({creator:1}),asswithdrawSchema.index({id:1}),asswithdrawSchema.index({ngay_xu_ly:1}),asswithdrawSchema.index({trang_thai:1}),asswithdrawSchema.index({denom:1}),asswithdrawSchema.index({token:1}),asswithdrawSchema.index({status:1}),asswithdrawSchema.index({user_created:1}),asswithdrawSchema.index({date_created:1}),asswithdrawSchema.index({date_updated:1}),asswithdrawSchema.index({creator:"text",token:"text",
denom:"text"},{name:"asswithdraw_index2"}),model.on("index",async function($err$$){$err$$?console.error("asswithdraw index error",$err$$):console.info("asswithdraw indexing complete")}));module.exports=model;