/** * Created by zhang on 2018/11/26. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; let ration_template = new Schema({ ID:String, projectID: {type: Number, index: true}, rationID:{type: String, index: true}, createLocation:Number,//提取位置 templateList:[new Schema({ code:String, name:String, type:String, defaultLocation:String,//记录默认给定的清单编号,恢复原始数据时用(目前复制整块) billsLocation:String,//这个是清单编号 fxID:String,//这个是分项对应的ID unit:String, quantity:String, coe:String, billID:String//记取位置对应的清单ID },{ _id: false })] },{versionKey:false}); mongoose.model('ration_template', ration_template,"ration_template");