text: const Joi = require('joi');
  const {
    idRequired,
    stringRequired,
    stringOptional,
    emailRequired,
    booleanOptional,
    emailOptional,
    idOptional,
    timezoneRequired,
    timezoneOptional,
  } = require('./sharedValidator');
  
  const studentCreateValidation = Joi.object({
    tutorId: idRequired,
    classId: idRequired,
    firstName: stringRequired,
    middleName: stringOptional,
    lastName: stringRequired,
    email: emailRequired,
    timezone: timezoneRequired,
    didWithdraw: booleanOptional,
    didDefer: booleanOptional,
    didSendSlackInvite: booleanOptional,
    didSendIntroEmail: booleanOptional,
  }).options({ abortEarly: false });
  
  const studentUpdateValidation = Joi.object({
    tutorId: idOptional,
    classId: idOptional,
    firstName: stringOptional,
    middleName: stringOptional,
    lastName: stringOptional,
    email: emailOptional,
    timezone: timezoneOptional,
    didWithdraw: booleanOptional,
    didDefer: booleanOptional,
    didSendSlackInvite: booleanOptional,
    didSendIntroEmail: booleanOptional,
  })
    .or(
      'tutorId',
      'classId',
      'firstName',
      'middleName',
      'lastName',
      'email',
      'timezone',
      'didWithdraw',
      'didDefer',
      'didSendSlackInvite',
      'didSendIntroEmail'
    )
    .options({ abortEarly: false });
  
  const studentIdParamValidation = Joi.object({
    studentId: idOptional,
  })
    .options({ abortEarly: false })
    .unknown(true);
  
  module.exports = {
    studentCreateValidation,
    studentUpdateValidation,
    studentIdParamValidation,
  };
  