123456789101112131415 |
- const mongoose = require('mongoose');
- const Schema = mongoose.Schema;
- const collectionName = 'std_price_info_summary';
- const modelSchema = {
- ID: { type: String, required: true },
- code: String, // 主从对应码
- classCode: String, // 别名编码
- expString: String, // 计算式,
- name: String, // 材料名称
- specs: String, // 规格型号
- unit: String, // 单位
- };
- mongoose.model(collectionName, new Schema(modelSchema, { versionKey: false, collection: collectionName }));
|