engineering_lib.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * 计价规则数据结构
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/8/31
  6. * @version
  7. */
  8. import mongoose from "mongoose";
  9. let Schema = mongoose.Schema;
  10. let collectionName = 'engineering_lib';
  11. let modelSchema = {
  12. // 标准清单
  13. bill_lib: {
  14. type: Schema.Types.Mixed,
  15. default: []
  16. },
  17. // 定额库
  18. ration_lib: {
  19. type: Schema.Types.Mixed,
  20. default: []
  21. },
  22. // 工料机库
  23. glj_lib: {
  24. type: Schema.Types.Mixed,
  25. default: []
  26. },
  27. // 列设置
  28. main_tree_col: {
  29. type: Schema.Types.Mixed,
  30. default: {
  31. emptyRows: 3,
  32. headRows: 0,
  33. treeCol: 0,
  34. headRowHeight: [],
  35. cols:[]
  36. }
  37. },
  38. // 费率标准库
  39. fee_lib: {
  40. type: Schema.Types.Mixed,
  41. default: []
  42. },
  43. // 人工系数标准库
  44. artificial_lib: {
  45. type: Schema.Types.Mixed,
  46. default: []
  47. },
  48. // 计算程序标准库
  49. program_lib: {
  50. type: Schema.Types.Mixed,
  51. default: []
  52. },
  53. //设置人材机显示列
  54. glj_col:{
  55. showAdjustPrice:Boolean//是否显示调整价列
  56. }
  57. };
  58. mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));