rpt_cfg.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /**
  2. * Created by Tony on 2017/6/14.
  3. */
  4. let mongoose = require('mongoose');
  5. let dbm = require("../../../config/db/db_manager");
  6. let smartcostdb = dbm.getCfgConnection("scConstruct");
  7. let Schema = mongoose.Schema;
  8. let FormatSchema = new Schema({
  9. "ID" : String,
  10. "CfgDispName": String,
  11. "Shrink" : String,
  12. "ShowZero" : String,
  13. "Horizon" : String,
  14. "Vertical" : String,
  15. "Wrap" : String
  16. });
  17. let FontSchema = new Schema({
  18. "ID" : String,
  19. "Name" : String,
  20. "CfgDispName": String,
  21. "FontHeight" : String,
  22. "FontColor" : String,
  23. "FontBold" : String,
  24. "FontItalic" : String,
  25. "FontUnderline" : String,
  26. "FontStrikeOut" : String,
  27. "FontAngle" : String
  28. });
  29. let LineSchema = new Schema({
  30. "Position": String,
  31. "LineWeight": String,
  32. "DashStyle": String,
  33. "Color": String
  34. });
  35. let StyleSchema = new Schema({
  36. "ID" : String,
  37. "CfgDispName": String,
  38. "border_style" : [LineSchema]
  39. });
  40. let RptCfgSchema = new Schema({
  41. "userId" : String,
  42. "fonts": [FontSchema],
  43. "borders" : [StyleSchema],
  44. "formats" : [FormatSchema]
  45. });
  46. let Rpt_Cfg_Mdl = smartcostdb.model("rpt_cfg", RptCfgSchema, "rpt_cfg");
  47. module.exports = Rpt_Cfg_Mdl;