import { z } from 'zod';
import { CreateOwnershipCostSchema, UpdateOwnershipCostSchema, OwnershipCostTypeSchema } from '../domain/ownership-costs.types';

export const ListQuerySchema = z.object({
  vehicleId: z.string().uuid().optional(),
  costType: OwnershipCostTypeSchema.optional(),
  documentId: z.string().uuid().optional(),
});

export const IdParamsSchema = z.object({ id: z.string().uuid() });

export const CreateBodySchema = CreateOwnershipCostSchema;
export const UpdateBodySchema = UpdateOwnershipCostSchema;

export type ListQuery = z.infer<typeof ListQuerySchema>;
export type IdParams = z.infer<typeof IdParamsSchema>;
export type CreateBody = z.infer<typeof CreateBodySchema>;
export type UpdateBody = z.infer<typeof UpdateBodySchema>;
