ration_glj.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. createType: {type: String,default:'normal'},//normal、add、replace 正常、添加工料机、替换工料机
  37. from:{type: String,default:'std'}//std, cpt 来自标准工料机库、补充工料机库
  38. },{versionKey:false});
  39. mongoose.model('ration_glj', ration_glj);