const Joi = require('joi');

const userSchemas = {
  signup: Joi.object({
    email: Joi.string().email().required(),
    password: Joi.string().min(8).required(),
    name: Joi.string().min(2).required()
  }),
  login: Joi.object({
    email: Joi.string().email().required(),
    password: Joi.string().required()
  }),
  update: Joi.object({
    email: Joi.string().email(),
    name: Joi.string().min(2)
  })
};

module.exports = userSchemas;