import * as yup from 'yup';

export const sectorSchema = yup.object().shape({
  name: yup.string().required('Le nom est requis'),
  mapAdresse: yup.object().shape({
    address: yup.string(),
    lat: yup.number(),
    lng: yup.number(),
    country: yup.string(),
    city: yup.string(),
    postalCode: yup.string(),
    formattedAddress: yup.string()
  }).optional().nullable(),
  description: yup.string().optional().nullable()
});