Page.js 682 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. date: {
  12. type: String,
  13. },
  14. // 摘要
  15. slug: {
  16. type: String,
  17. },
  18. // 附件
  19. annex: {
  20. type: String,
  21. },
  22. annexname: {
  23. type: String,
  24. },
  25. // 内容
  26. content: {
  27. type: String,
  28. },
  29. // 创建时间
  30. createAt: {
  31. type: String,
  32. },
  33. // 数据id
  34. id: {
  35. type: String,
  36. },
  37. // 数据编码
  38. code: {
  39. type: String,
  40. },
  41. });
  42. return mongoose.model('Page', PageSchema);
  43. };