/** * Created by chen on 2017/6/29. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; var ration_glj = new Schema({ ID:{ type: String, index: true }, GLJID:Number, repositoryId:Number, projectID: Number, rationID:{type: String, index: true}, projectGLJID:Number, name:String, code:String, //原始的编码 original_code: { type: String, index: true }, rcode:String, specs:String, unit:String, shortName:String, billsItemID: String, type:Number, // 机型 model: Number, // 调整系数ID adjCoe: Number, quantity:String, customQuantity:String, rationItemQuantity:String, tenderQuantity:String,//调整后消耗量 createType: {type: String,default:'normal'},//normal、add、replace 正常、添加工料机、替换工料机 from:{type: String,default:'std'}//std, cpt 来自标准工料机库、补充工料机库 },{versionKey:false}); mongoose.model('ration_glj', ration_glj);