import { z } from "zod";

export const landlordSchema = z.object({
  id: z.number(),
  name: z.string(),
  mobile: z
    .string()
    .min(10, "Mobile number should be 10-digit only.")
    .max(10, "Mobile number should be 10-digit only."),
  alternateMobile: z
    .string()
    .min(10, "Alternate mobile number should be 10-digit only.")
    .max(15, "Alternate mobile number should be 10-digit only.")
    .nullable(),
  gender: z.number().nullable(),       // 1=Male, 2=Female, 3=Other (example)
  bloodGroup: z.number().nullable(),   // map via master table / enum
  dob: z.string().nullable(),          // ISO date string (YYYY-MM-DD)
  address: z.string().nullable(),
  nationality: z.string().nullable(),
  email: z.string().nullable(),
  createdAt: z.string().datetime(),
  updatedAt: z.string().datetime(),
});

type landlordTypes = z.infer<typeof landlordSchema>;

export default landlordTypes;