ration_coe.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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: String, // 系数ID(流水号ID)
  19. name: String, // 名称
  20. content: String, // 说明
  21. original_code:String, //原人材机编码
  22. option_codes:String, //可选人材机编码
  23. select_code:String,
  24. rationID:String,
  25. projectID:Number,
  26. coeID:Number,
  27. isAdjust:Number, //0不调整,1调整
  28. seq:Number,//序数,排序用
  29. coes: [coeSchema]
  30. }, {versionKey: false});
  31. mongoose.model('ration_coe', coeListSchema);