flexbiz-server
Version:
Flexible Server
5 lines (4 loc) • 1.45 kB
JavaScript
;const asscashwithdrawSchema=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},amount:{type:Number,required:!0},require_date:Date,payer:{type:String,trim:!0},payment_date:Date,trang_thai:String,note:String,ten_ngan_hang:String,ten_tk:String,so_tk:String,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.asscashwithdraw||mongoose.model("asscashwithdraw",asscashwithdrawSchema);
(global.configs||{}).createIndexes&&(asscashwithdrawSchema.index({id_app:1}),asscashwithdrawSchema.index({creator:1}),asscashwithdrawSchema.index({id:1}),asscashwithdrawSchema.index({payer:1}),asscashwithdrawSchema.index({token:1}),asscashwithdrawSchema.index({require_date:-1}),asscashwithdrawSchema.index({payment_date:-1}),asscashwithdrawSchema.index({trang_thai:1}),asscashwithdrawSchema.index({status:1}),asscashwithdrawSchema.index({user_created:1}),asscashwithdrawSchema.index({creator:"text",token:"text",
payer:"text",note:"text"},{name:"asscashwithdraw_index2"}),model.on("index",async function($err$$){$err$$?console.error("asscashwithdraw index error",$err$$):console.info("asscashwithdraw indexing complete")}));module.exports=model;