std_price_info_items.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // 信息价数据
  2. const mongoose = require('mongoose');
  3. const Schema = mongoose.Schema;
  4. const keywordSchema = new Schema({
  5. keyword: {
  6. type: String,
  7. default: ''
  8. }, // 关键字
  9. coe: {
  10. type: String,
  11. default: ''
  12. }, // 系数(关键字效果)
  13. group: {
  14. type: String,
  15. default: ''
  16. }, // 组别
  17. optionCode: {
  18. type: String,
  19. default: ''
  20. }, // 选项号
  21. }, { _id: false });
  22. const priceInfoItems = new Schema({
  23. ID: String,
  24. libID: String,
  25. classID: String, // 分类
  26. code: {
  27. type: String,
  28. default: ''
  29. },
  30. name: {
  31. type: String,
  32. default: ''
  33. },
  34. specs: {
  35. type: String,
  36. default: ''
  37. },
  38. unit: {
  39. type: String,
  40. default: ''
  41. },
  42. taxPrice: {
  43. type: String,
  44. default: ''
  45. }, // 含税价格
  46. noTaxPrice: {
  47. type: String,
  48. default: ''
  49. }, // 不含税价格
  50. // 以下冗余数据为方便前台信息价功能处理
  51. period: String, // 期数 eg: 2020-05
  52. areaID: String, // 地区
  53. compilationID: String, // 费用定额
  54. remark: {
  55. type: String,
  56. default: ''
  57. },
  58. // 别名编码
  59. classCode: {
  60. type: String,
  61. default: ''
  62. },
  63. // 计算式
  64. expString: {
  65. type: String,
  66. default: ''
  67. },
  68. // 月份、价格备注
  69. dateRemark: {
  70. type: String,
  71. default: ''
  72. },
  73. // 关键字
  74. keywordList: {
  75. type: [keywordSchema],
  76. default: []
  77. }
  78. }, { versionKey: false });
  79. mongoose.model('std_price_info_items', priceInfoItems, 'std_price_info_items');