Page.js 641 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use strict';
  2. module.exports = app => {
  3. const { mongoose } = app;
  4. const { Schema } = mongoose;
  5. const PageSchema = new Schema({
  6. // 标题
  7. title: {
  8. type: String,
  9. },
  10. // 短标题
  11. shortTitle: {
  12. type: String,
  13. },
  14. // 摘要
  15. slug: {
  16. type: String,
  17. },
  18. // 附件
  19. annex: {
  20. type: String,
  21. },
  22. // 内容
  23. content: {
  24. type: String,
  25. },
  26. // 创建时间
  27. createAt: {
  28. type: String,
  29. },
  30. // 数据id
  31. id: {
  32. type: String,
  33. },
  34. // 绑定菜单
  35. menu: {
  36. type: String,
  37. },
  38. });
  39. return mongoose.model('Page', PageSchema);
  40. };