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.

12345678910111213141516171819202122232425262728
  1. 'use strict'
  2. const Joi = require('joi')
  3. const surveyResponseSchema = require('./responses')
  4. const userSchema = require('./user')
  5. const tagSchema = require('./tags')
  6. const singleProfile = Joi.object({
  7. profile_id: Joi.number(),
  8. user_id: Joi.number(),
  9. user_name: Joi.string(),
  10. user_email: Joi.string(),
  11. user_info: Joi.any(),
  12. responses: surveyResponseSchema.list,
  13. reveal: Joi.array().items(),
  14. tags: tagSchema.list,
  15. user_type: Joi.any(),
  16. user: userSchema.single,
  17. profile_description: Joi.string().allow(null, ''),
  18. profile_prefs: Joi.object(),
  19. profile_media: Joi.array().items(),
  20. profile_languages: Joi.array().items(),
  21. }).label('profile_single')
  22. module.exports = {
  23. single: singleProfile,
  24. list: Joi.array().items(singleProfile).label('profile_list'),
  25. }