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.

40 lines
558 B

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