Menu.js 639 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use strict';
  2. module.exports = app => {
  3. const { mongoose } = app;
  4. const { Schema } = mongoose;
  5. const MenuSchema = new Schema({
  6. name: {
  7. type: String,
  8. },
  9. code: {
  10. type: String,
  11. },
  12. id: {
  13. type: String,
  14. },
  15. state: {
  16. type: String,
  17. },
  18. type: {
  19. type: String,
  20. },
  21. uri: {
  22. type: String,
  23. },
  24. pid: {
  25. type: String,
  26. },
  27. en: {
  28. type: String,
  29. },
  30. sort: {
  31. type: Number,
  32. },
  33. pages: {
  34. type: String,
  35. },
  36. // 绑定栏目
  37. column: { type: Array, required: false },
  38. });
  39. return mongoose.model('Menu', MenuSchema);
  40. };