rpt_cfg.js 1.1 KB

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