/**
 * Created by Zhong on 2018/3/22.
 */
/*标准工料机*/
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
//标准工料机的组成物只来自标准工料机
const std_gljComponent = new Schema(
    {
        ID: Number,
        consumeAmt: Number
    },
    {_id: false},
    {versionKey: false}
);

const std_glj = new Schema({
    deleted: Boolean,
    repositoryId: Number,
    ID: Number,
    code: String,
    name: String,
    specs: String,
    basePrice: Number,
    gljClass: Number,
    gljType: Number,
    shortName: String,
    unit: String,
    adjCoe: Number,
    component: [std_gljComponent],
    materialType: Number, //三材类型：钢材1、钢筋2、木材3、水泥4、标准砖5
    materialCoe: Number, //三材系数
    model: Number, //机型
},{versionKey: false});

mongoose.model('std_glj_lib_gljList', std_glj, 'std_glj_lib_gljList');
