Configuration.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. 'use strict';
  2. module.exports = app => {
  3. const { mongoose } = app;
  4. const { Schema } = mongoose;
  5. const ConfigurationSchema = new Schema({
  6. // 本期封面
  7. path: {
  8. type: String,
  9. },
  10. // 名称
  11. name: {
  12. type: String,
  13. },
  14. // 描述
  15. describe: {
  16. type: String,
  17. },
  18. // 单位
  19. company: {
  20. type: String,
  21. },
  22. // 电话
  23. phone: {
  24. type: String,
  25. },
  26. // 地址
  27. address: {
  28. type: String,
  29. },
  30. // 邮箱
  31. mail: {
  32. type: String,
  33. },
  34. // 邮编
  35. postcode: {
  36. type: String,
  37. },
  38. // 备案号
  39. record: {
  40. type: String,
  41. },
  42. // 是否显示弹窗
  43. isshow: {
  44. type: Boolean,
  45. },
  46. // 弹窗文字
  47. isname: {
  48. type: String,
  49. },
  50. // 是否显示首页标题
  51. isShowTitle: {
  52. type: Boolean,
  53. default: false,
  54. },
  55. // 首页标题文字
  56. homeTitle: {
  57. type: String,
  58. },
  59. // 首页标题地址
  60. homeUrl: {
  61. type: String,
  62. },
  63. });
  64. return mongoose.model('Configuration', ConfigurationSchema);
  65. };