ration_template.js 839 B

123456789101112131415161718192021222324252627
  1. /**
  2. * Created by zhang on 2018/11/26.
  3. */
  4. var mongoose = require('mongoose'),
  5. Schema = mongoose.Schema;
  6. let ration_template = new Schema({
  7. ID:String,
  8. projectID: {type: Number, index: true},
  9. rationID:{type: String, index: true},
  10. createLocation:Number,//提取位置
  11. templateList:[new Schema({
  12. code:String,
  13. name:String,
  14. type:String,
  15. defaultLocation:String,//记录默认给定的清单编号,恢复原始数据时用(目前复制整块)
  16. billsLocation:String,//这个是清单编号
  17. fxID:String,//这个是分项对应的ID
  18. unit:String,
  19. quantity:String,
  20. coe:String,
  21. billID:String//记取位置对应的清单ID
  22. },{ _id: false })]
  23. },{versionKey:false});
  24. mongoose.model('ration_template', ration_template,"ration_template");