glj_repository.js 545 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * 数据结构
  3. *
  4. * @author CaiAoLin
  5. * @date 2017/6/28
  6. * @version
  7. */
  8. import mongoose from "mongoose";
  9. let Schema = mongoose.Schema;
  10. let collectionName = 'glj_repository';
  11. let modelSchema = {
  12. // 自增id
  13. id: Number,
  14. // 定额id
  15. ration_id: Number,
  16. // 名称
  17. name: String,
  18. // 编号
  19. code: String,
  20. // 单位
  21. unit: String,
  22. // 定额单价
  23. ration_price: String,
  24. // 规格
  25. standard: String
  26. };
  27. export default mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false}));