12345678910111213141516171819202122232425 |
- /**
- * Created by Mai on 2017/9/14.
- */
- let mongoose = require("mongoose");
- let Schema = mongoose.Schema;
- let collectionName = 'proj_setting';
- let billsCalcModeConst = {
- rationContent: 0, rationPrice: 1, rationPriceConverse: 2, billsPrice: 3
- };
- let projSettingSchema = {
- projectID: Number,
- // 列设置
- main_tree_col: {
- type: Schema.Types.Mixed,
- default: {}
- },
- billsCalcMode: {
- type: Number,
- default: billsCalcModeConst.rationContent
- // rationContent = 0, rationPrice = 1, rationPriceConverse = 2, billsPrice = 3
- }
- };
- let model = mongoose.model(collectionName, new Schema(projSettingSchema, {versionKey: false, collection: collectionName}));
- export {model as default, collectionName as collectionName, billsCalcModeConst as billsCalcModeConst};
|