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.

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