1234567891011121314151617181920212223242526272829 |
- /**
- * 配合比标准库数据模型
- *
- * @author CaiAoLin
- * @date 2017/7/7
- * @version
- */
- const mongoose = require('mongoose');
- let Schema = mongoose.Schema;
- let collectionName = 'std_mix_ratio';
- let modelSchema = {
- // 编码
- code: String,
- // 名称
- name: String,
- // 消耗量
- consumption: Number,
- // 关联工料机的编码
- connect_code: {
- type: String,
- index: true
- },
- // 对应的工料机总库id
- glj_id: Number,
- // 对应工料机类型
- glj_type: Number
- };
- mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
|