ration_coe.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * Created by chen on 2017/6/29.
  3. */
  4. var mongoose = require('mongoose'),
  5. Schema = mongoose.Schema;
  6. var coeSchema = mongoose.Schema({
  7. coeType: String, // 系数类型,指作用范围:// 单个(如:111量0.001)、人工类、材料类、机械类、全部(如:定额×0.925)。
  8. gljCode: String, // 要调整的工料机ID(当coeType=0时有效)
  9. gljName: String,
  10. operator: String, // 运算符(*、+、-、=)
  11. amount: Number, // 调整的量
  12. replaceCode:String,
  13. replaceName:String,
  14. _id: false
  15. });
  16. var coeListSchema = mongoose.Schema({
  17. libID: Number, // 所属定额库ID
  18. ID: {type: String, index: true}, // 系数ID(流水号ID)
  19. name: String, // 名称
  20. content: String, // 说明
  21. original_code:String, //原人材机编码
  22. option_codes:String, //可选人材机编码
  23. option_list:[Schema.Types.Mixed],//下拉列表选项
  24. select_code:String,
  25. rationID:{type: String, index: true},
  26. projectID:{type: Number, index: true},
  27. coeID:Number,
  28. isAdjust:Number, //0不调整,1调整
  29. seq:Number,//序数,排序用
  30. coes: [coeSchema]
  31. }, {versionKey: false});
  32. mongoose.model('ration_coe', coeListSchema);