installation_fee.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * Created by Zhong on 2017/9/13.
  3. */
  4. import mongoose from "mongoose";
  5. let Schema = mongoose.Schema;
  6. //安装增加费-费用规则
  7. let feeRuleSchema = new Schema({
  8. ID: String,
  9. sectionId: String, //分册章节id
  10. feeItemId:String,
  11. code: String,
  12. rule: String,
  13. base: String,
  14. feeRate: Number,
  15. labour: Number,
  16. material: Number,
  17. machine: Number
  18. });
  19. //安装增加费-分册章节
  20. let installSectionSchema = new Schema({
  21. ID: String,
  22. feeItemId: String,
  23. feeRuleId: String,
  24. name: String,
  25. position: String//记取位置
  26. });
  27. //安装增加费-费用项
  28. let installFeeItemSchema = new Schema({
  29. ID: String,
  30. feeItem: String, //费用项
  31. feeType: String, //费用类型
  32. position: String//记取位置
  33. });
  34. let installationFeeSchema = new Schema({
  35. ID:String,
  36. libID:Number,
  37. libName:String,
  38. projectID:String,
  39. installFeeItem:[installFeeItemSchema],
  40. installSection:[installSectionSchema],
  41. feeRule:[feeRuleSchema]
  42. },{versionKey:false});
  43. let installationFeeModel = mongoose.model("installation_fee",installationFeeSchema,"installation_fee");
  44. export{ installationFeeModel as default}