/** * Created by zhang on 2018/3/22. */ let mongoose = require("mongoose"); let subSchema = require("../all_schemas/bills_sub_schemas"); let deleteSchema = require('../all_schemas/delete_schema'); let Schema = mongoose.Schema; let billsSchema = new Schema({ ID: {type: String, index: true}, ParentID: String, NextSiblingID: String, projectID: {type: Number, index: true} , chapterID: Number, billsLibId: Number, code: String, fullCode: String, type:{type: Number,default:4},//1 :大项费用 2:分部 3分项 4清单;5补项 isAdd:{type: Number,default:0},//1 true 0 false是否新增 name: String, unit: String, quantity: String, // Decimal quantityEXP:String,//工程量表达式 feeRateID:Number, feeRate:String, isFromDetail:{type: Number,default:0},//1 true 0 false programID: Number, calcBase: String, calcBaseValue: String, // 计算基数表达式的值 tenderCalcBaseValue: String, // 调价后计算基数表达式的值 // 工程量计算规则 ruleText: String, // 说明 comments: String, // 调价 xs_Labour: String, // Decimal xs_Material: String, // Decimal xs_Machine: String, // Decimal xs_FeeRate: String, // Decimal xs_LabourPrice: String, // Decimal xs_MaterialPrice: String, // Decimal xs_MachinePrice: String, // Decimal isTender_Labour: Boolean, isTender_Material: Boolean, isTender_Machine: Boolean, targetUnitFee:String,//目标单价 targetTotalFee:String,//目标合价 //工作内容//zhong 2017-8-31 jobContentText: String, //清单工作内容列显示文本, 减少第一次拉数据时的循环次数 jobContent: [subSchema.jobContentSchema], //项目特征 itemCharacterText: String,//清单项目特征列显示文本 itemCharacter: [subSchema.itemCharacterSchema], // 费用字段 fees: [subSchema.feesSchema], // 标记字段 flags: [subSchema.flagsSchema], //消耗量调整系数字段 quantityCoe:subSchema.quantityCoeSchema, //子目工程量调整系数 rationQuantityCoe:String, // 不调价 is_adjust_price: {type: Number,default: 0}, installationKey:String,//用来记录安装增加费的关联字段 deleteInfo: deleteSchema, isEstimate: { type: Number, default: 0 }, // 1 true 0 false 是否暂估 lockUnitPrice:{type:Schema.Types.Mixed,default:false}, // true false 锁定综合单价,true 为锁定 mainBills:{type:Schema.Types.Mixed,default:false},//true 是,false否,null 不确定,三个状态 //是否记取面积增加费 areaIncreaseFee:{type:Schema.Types.Mixed,default:false},//true 是,false否,null 不确定,三个状态 outPutMaxPrice:{type:Schema.Types.Mixed,default:false},//输出最高限价 true 是,false否,null 不确定,三个状态 outPutLimitPrice:{type:Schema.Types.Mixed,default:false},//输出限价 true 是,false否,null 不确定,三个状态 maxPrice:String,//最高限价 minPrice:String,//最低限价 remark:String, engineeringContent:String,//工程内容 serviceContent:String,//服务内容 claimVisa:String,//签证及索赔依据 //经济指标属性 economicType:String,//工程经济指标类别 quantityIndexType:String,//工程量指标类别 quantityIndexUnit:String,//工程量指标单位 quantityIndexCoe:Number,//单位转换系数 bookmarkBackground:String,//书签背景色 bookmarkAnnotation:String,//批注 overHeight: String // 超高降效 }); mongoose.model("bills", billsSchema);