You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
596 B

  1. 'use strict'
  2. const Mongoose = require('mongoose')
  3. /**
  4. * Entry schema
  5. *
  6. * @type {<Mongoose.Schema>}
  7. */
  8. var entrySchema = Mongoose.Schema({
  9. _id: String,
  10. title: {
  11. type: String,
  12. required: true,
  13. minlength: 2
  14. },
  15. subtitle: {
  16. type: String,
  17. default: ''
  18. },
  19. parentTitle: {
  20. type: String,
  21. default: ''
  22. },
  23. parentPath: {
  24. type: String,
  25. default: ''
  26. },
  27. isDirectory: {
  28. type: Boolean,
  29. default: false
  30. },
  31. isEntry: {
  32. type: Boolean,
  33. default: false
  34. }
  35. }, {
  36. timestamps: {}
  37. })
  38. module.exports = Mongoose.model('Entry', entrySchema)