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.

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