1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- /**
- * 计价规则数据结构
- *
- * @author CaiAoLin
- * @date 2017/8/31
- * @version
- */
- import mongoose from "mongoose";
- let Schema = mongoose.Schema;
- let collectionName = 'engineering_lib';
- let modelSchema = {
- // 标准清单
- bill_lib: {
- type: Schema.Types.Mixed,
- default: []
- },
- // 定额库
- ration_lib: {
- type: Schema.Types.Mixed,
- default: []
- },
- // 工料机库
- glj_lib: {
- type: Schema.Types.Mixed,
- default: []
- },
- // 列设置
- main_tree_col: {
- type: Schema.Types.Mixed,
- default: {
- emptyRows: 3,
- headRows: 0,
- treeCol: 0,
- headRowHeight: [],
- cols:[]
- }
- },
- // 费率标准库
- fee_lib: {
- type: Schema.Types.Mixed,
- default: []
- },
- // 人工系数标准库
- artificial_lib: {
- type: Schema.Types.Mixed,
- default: []
- },
- // 计算程序标准库
- program_lib: {
- type: Schema.Types.Mixed,
- default: []
- }
- };
- mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
|