12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /**
- * Created by Tony on 2017/6/14.
- * 把报表相关的配置(字体、边框、格式等都放在一条记录中,方便整理,毕竟用户的报表格式基本是固定的,无需怎样调整)
- */
- // import mongoose from 'mongoose';
- let mongoose = require("mongoose");
- let Schema = mongoose.Schema;
- let FormatSchema = new Schema({
- "ID" : String,
- "CfgDispName": String,
- "Shrink" : String,
- "ShowZero" : String,
- "Horizon" : String,
- "Vertical" : String,
- "Wrap" : String,
- "ShrinkFirst" : String,
- "CloseOutput" : String
- });
- let FontSchema = new Schema({
- "ID" : String,
- "Name" : String,
- "CfgDispName": String,
- "FontHeight" : String,
- "FontColor" : String,
- "FontBold" : String,
- "FontItalic" : String,
- "FontUnderline" : String,
- "FontStrikeOut" : String,
- "FontAngle" : String
- });
- let LineSchema = new Schema({
- "Position": String,
- "LineWeight": String,
- "DashStyle": String,
- "Color": String
- });
- let StyleSchema = new Schema({
- "ID" : String,
- "CfgDispName": String,
- "border_style" : [LineSchema]
- });
- let RptCfgSchema = new Schema({
- "userId" : String,
- "fonts": [FontSchema],
- "borders" : [StyleSchema],
- "formats" : [FormatSchema]
- });
- mongoose.model("rpt_cfg", RptCfgSchema, "rpt_cfg");
- // let Rpt_Cfg_Mdl = mongoose.model("rpt_cfg", RptCfgSchema, "rpt_cfg");
- // export {Rpt_Cfg_Mdl as default};
|