ration_glj.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * Created by chen on 2017/6/29.
  3. */
  4. var mongoose = require('mongoose'),
  5. Schema = mongoose.Schema;
  6. var ration_glj = new Schema({
  7. ID:{type: String, index: true},
  8. GLJID:Number,
  9. repositoryId:Number,
  10. projectID: {type: Number, index: true},
  11. rationID:{type: String, index: true},
  12. projectGLJID:Number,
  13. name:String,
  14. code:String,
  15. //原始的编码
  16. original_code: {
  17. type: String,
  18. index: true
  19. },
  20. rcode:String,
  21. //新结构,计录替换前的工料机信息,对于混凝土,替换,计算等问题处理,替换时保存旧数据的5大项信息
  22. mIndexObj: Schema.Types.Mixed,
  23. specs:String,
  24. unit:String,
  25. shortName:String,
  26. billsItemID: String,
  27. type:Number,
  28. // 机型
  29. model: Number,
  30. // 调整系数ID
  31. adjCoe: Number,
  32. quantity:String,
  33. customQuantity:String,
  34. rationItemQuantity:String,
  35. tenderQuantity:String,//调整后消耗量
  36. // 定额配合比
  37. rationProportion: {
  38. type: Number,
  39. default: 0
  40. },
  41. // 调整配合比
  42. adjustProportion: {
  43. type: Number,
  44. default: 0
  45. },
  46. createType: {type: String,default:'normal'},//normal、add、replace 正常、添加工料机、替换工料机
  47. from:{type: String,default:'std'}//std, cpt 来自标准工料机库、补充工料机库
  48. },{versionKey:false});
  49. mongoose.model('ration_glj', ration_glj);