import { z } from "zod";

export const propertyAssetsSchema = z.object({
  id: z.number(),
  clientId: z.number(),
  assetId: z.number(),
  propId: z.number(),
  status: z.number(),
  unitCount: z.number(),
  assignedTo: z.number(),
  assignedToId: z.number(),
  createdAt: z.string().datetime(),
  updatedAt: z.string().datetime(),
});

type propertyAssetsTypes = z.infer<typeof propertyAssetsSchema>;

export const propertyAssetsAddSchema = z.object({
  assetId: propertyAssetsSchema.shape.assetId,
  propId: propertyAssetsSchema.shape.propId,
  count: propertyAssetsSchema.shape.unitCount,
  assignedTo: propertyAssetsSchema.shape.assignedTo,
  status: propertyAssetsSchema.shape.status,
});

export const EditAssignmentDetailsSchema = z.object({
  id: propertyAssetsSchema.shape.id,
  assetId: propertyAssetsSchema.shape.assetId,
  propId: propertyAssetsSchema.shape.propId,
  count: propertyAssetsSchema.shape.unitCount,
  assignedTo: propertyAssetsSchema.shape.assignedTo,
});

export default propertyAssetsTypes;
