'use strict';

/**
 *
 *
 * @author Zhong
 * @date 2018/10/23
 * @version
 */

/*
* 补充定额库用户新增子目换算
* 用户ID与费用定额ID绑定子目换算
* */

import mongoose from 'mongoose';
const Schema = mongoose.Schema;
const coeSchema = new Schema({
    coeType: String,                // 系数类型
    gljCode: String,                //要调整的人材机编码
    gljName: String,
    operator: String,               // 运算符（*、+、-、=）
    amount: String,                 // 调整的量
    _id: false
});

const coeListSchema = new Schema({
    userId: String,
    compilationId: String,
    ID: String,                         // uuid
    serialNo: Number,                  //编号
    name: String,                       // 名称
    content: String,                    // 说明
    coes: [coeSchema]
}, {versionKey: false});

mongoose.model('complementary_ration_coe_list', coeListSchema, 'complementary_ration_coe_list');
