entry.js 390 B

12345678910111213141516171819202122232425262728293031
  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. },
  23. {
  24. timestamps: {}
  25. })
  26. module.exports = Mongoose.model('Entry', entrySchema)