Source: schema/schemas.js

  1. /**
  2. * @module schemas
  3. */
  4. /**
  5. * @name AdventSchema
  6. * @description Schema of an Advent Object
  7. */
  8. const AdventSchema = (
  9. {
  10. "start": DateSchema,
  11. "end?": DateSchema,
  12. "title": String,
  13. "content": String,
  14. "tags": Array.of(String)
  15. }
  16. );
  17. /**
  18. * @name DateSchema
  19. * @description Schema of a Date Object
  20. */
  21. const DateSchema = (
  22. {
  23. "month": Number,
  24. "day": Number,
  25. "year": Number
  26. }
  27. );
  28. module.exports = {
  29. AdventSchema,
  30. DateSchema
  31. };