std_mix_ratio.js 642 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * 配合比标准库数据模型
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/7/7
  6. * @version
  7. */
  8. const mongoose = require('mongoose');
  9. let Schema = mongoose.Schema;
  10. let collectionName = 'std_mix_ratio';
  11. let modelSchema = {
  12. // 编码
  13. code: String,
  14. // 名称
  15. name: String,
  16. // 消耗量
  17. consumption: Number,
  18. // 关联工料机的编码
  19. connect_code: {
  20. type: String,
  21. index: true
  22. },
  23. // 对应的工料机总库id
  24. glj_id: Number,
  25. // 对应工料机类型
  26. glj_type: Number
  27. };
  28. mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));