unit_price_file.js 702 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * 具体单价数据结构
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/6/29
  6. * @version
  7. */
  8. const mongoose = require('mongoose');
  9. let deleteSchema = require('../all_schemas/delete_schema');
  10. let Schema = mongoose.Schema;
  11. let collectionName = 'unit_price_file';
  12. let modelSchema = {
  13. // 自增id
  14. id: {
  15. type: Number,
  16. index: true
  17. },
  18. // 标段id
  19. project_id: {
  20. type: Number,
  21. index: true
  22. },
  23. // 显示名称
  24. name: String,
  25. // 所属用户id
  26. user_id: String,
  27. // 顶层projectId
  28. root_project_id: Number,
  29. deleteInfo: deleteSchema
  30. };
  31. mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));