glj.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * 工料机数据模型
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/6/29
  6. * @version
  7. */
  8. import mongoose from "mongoose";
  9. let Schema = mongoose.Schema;
  10. let collectionName = 'glj_list';
  11. let modelSchema = {
  12. // 自增id
  13. id: Number,
  14. // 工料机总库ID
  15. glj_repository_id: Number,
  16. // 标段ID
  17. project_id: Number,
  18. // 编码
  19. code: String,
  20. // 名称
  21. name: String,
  22. // 人工工种
  23. type_of_work: Number,
  24. // 是否暂估 (0为否 1为是)
  25. is_evaluate: {
  26. type: Number,
  27. default: 0
  28. },
  29. // 供货方式
  30. supply: {
  31. type: String,
  32. default: ''
  33. },
  34. // 甲供数量
  35. supply_quantity: {
  36. type: Number,
  37. default: 0
  38. },
  39. // 交货方式
  40. delivery: {
  41. type: String,
  42. default: ''
  43. },
  44. // 送达地点
  45. delivery_address: {
  46. type: String,
  47. default: ''
  48. },
  49. // 不调价
  50. is_adjust_price: {
  51. type: Number,
  52. default: 0
  53. },
  54. // 调整系数
  55. adjustment: {
  56. type: Number,
  57. default: 1
  58. },
  59. // 显示调整基价
  60. adjust_price: String,
  61. // 显示关联单价文件的字段
  62. unit_price: Schema.Types.Mixed
  63. };
  64. let model = mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false}));
  65. export { model as default, collectionName as collectionName} ;