std_billsGuidance_items.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author Zhong
  6. * @date 2018/5/29
  7. * @version
  8. */
  9. //清单指引条目
  10. const mongoose = require('mongoose');
  11. const Schema = mongoose.Schema;
  12. const stdBillsGuidanceItems = new Schema({
  13. libID: String,
  14. ID: { type: String, index: true }, //uuid
  15. ParentID: String,
  16. NextSiblingID: String,
  17. billsID: String, //关联清单的ID
  18. name: String,
  19. comment: String, //备注
  20. type: Number, //0:工作内容 1:定额
  21. rationID: {type: Number, default: null}, //定额类型时
  22. deleted: {type: Boolean, default: false},
  23. outputItemCharacter: {type: Boolean, default: false},
  24. required: {type: Boolean, default: false},
  25. unit: String, // 单位,辅助运距功能
  26. interval: String, // 区间,辅助运距功能
  27. isMaterial: {type: Boolean, default: false}, // 材料,辅助替换材料规格
  28. isDefaultOption: {type: Boolean, default: false}, // 是否是默认选项
  29. }, {versionKey: false});
  30. stdBillsGuidanceItems.index({ libID: 1, billsID: 1 });
  31. mongoose.model('std_billsGuidance_items', stdBillsGuidanceItems, 'std_billsGuidance_items');