import { z } from "zod";

export const electricitySchema = z.object({
  id: z.number(),
  clientId: z.number(),
  propId: z.number(),
  roomId: z.number(),
  units: z.number(),
  createdAt: z.string().datetime(),
  updatedAt: z.string().datetime(),
});

type electricityTypes = z.infer<typeof electricitySchema>;

export const AddUnitsSchema = z.object({
  unitsArr: z.array(
    z.object({ current: z.number(), previous: z.number(), roomId: z.number() })
  ),
  propId: z.number(),
});
export const AddTenantUnitsSchema = z.object({
  tenantId: z.number(),
  units: z.number().gt(0),
});

export default electricityTypes;
