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.

35 lines
445 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. parent: {
  19. type: String,
  20. default: ''
  21. },
  22. parentPath: {
  23. type: String,
  24. default: ''
  25. }
  26. },
  27. {
  28. timestamps: {}
  29. })
  30. module.exports = Mongoose.model('Entry', entrySchema)