/** * Created by Zhong on 2017/9/13. */ import mongoose from "mongoose"; let Schema = mongoose.Schema; //安装增加费-费用规则 let feeRuleSchema = new Schema({ ID: String, sectionId: String, //分册章节id feeItemId:String, code: String, rule: String, base: String, feeRate: Number, labour: Number, material: Number, machine: Number }); //安装增加费-分册章节 let installSectionSchema = new Schema({ ID: String, feeItemId: String, feeRuleId: String, name: String, position: String//记取位置 }); //安装增加费-费用项 let installFeeItemSchema = new Schema({ ID: String, feeItem: String, //费用项 feeType: String, //费用类型 position: String//记取位置 }); let installationFeeSchema = new Schema({ ID:String, libID:Number, libName:String, projectID:String, installFeeItem:[installFeeItemSchema], installSection:[installSectionSchema], feeRule:[feeRuleSchema] },{versionKey:false}); let installationFeeModel = mongoose.model("installation_fee",installationFeeSchema,"installation_fee"); export{ installationFeeModel as default}