/**
 * Created by jimiz on 2017/4/1.
 */
var mongoose = require("mongoose");
var Schema = mongoose.Schema;

// 费用字段
var feesSchema = new Schema({
    fieldName: String,
    unitFee: String, // Decimal. 单价
    totalFee: String, // Decimal. 合价
    tenderUnitFee: String, // Decimal. 调价后单价
    tenderTotalFee: String // Decimal. 调价后合价
});

// 标记字段
var flagsSchema = new Schema({
    fieldName: String,
    flag: Number
});

var changesSchema = new Schema({
    addGLJ: String,
    modifyGLJ:String,
    deleteGLJ:String
});

//add by Zhong2017-8-30
//清单工作内容字段
let jobContentSchema = new Schema({
    content: String, //工作内容
    serialNo: Number, //排序用
    isChecked: Boolean //是否勾选(输出)
}, {_id: false});
//特征值字段
let eigenvalueSchema = new Schema({
    value: String,
    isSelected: Boolean //判断哪个特征值被选中
}, {_id: false});
//项目特征字段
let itemCharacterSchema = new Schema({
    character: String, //特征
    serialNo: Number, //排序用
    eigenvalue: [eigenvalueSchema],//特征值
    isChecked: Boolean //是否勾选(输出)
}, {_id: false});

module.exports = {feesSchema: feesSchema, flagsSchema: flagsSchema, jobContentSchema: jobContentSchema, itemCharacterSchema: itemCharacterSchema};