UNPKG

flexbiz-server

Version:

Flexible Server

3 lines (2 loc) 859 B
'use strict';const dmloaitaskSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_loai_cv:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ten_loai_cv:{type:String,required:!0,maxlength:1024},he_so:Number,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&&(dmloaitaskSchema.index({id_app:1,ma_loai_cv:1},{unique:!0}),dmloaitaskSchema.index({ten_loai_cv:1}),dmloaitaskSchema.index({ma_loai_cv:"text",ten_loai_cv:"text"},{name:"dmloaitask_index_text"}),dmloaitaskSchema.index({status:1}),dmloaitaskSchema.index({user_created:1,visible_to:1,visible_to_users:1}));module.exports=mongoose.models.dmloaitask||mongoose.model("dmloaitask",dmloaitaskSchema);