import { z } from 'zod';

export const createApartmentSchema = z.object({
  name: z.string().min(1, 'Name is required').max(255),
  address: z.string().max(500).nullish(),
  totalArea: z.number().positive('Total area must be positive').nullish(),
});

export const updateApartmentSchema = z.object({
  name: z.string().min(1, 'Name is required').max(255).optional(),
  address: z.string().max(500).nullish(),
  totalArea: z.number().positive('Total area must be positive').nullish(),
});

export type CreateApartmentInput = z.infer<typeof createApartmentSchema>;
export type UpdateApartmentInput = z.infer<typeof updateApartmentSchema>;
