import type { DamageReportViewModel } from "./damageReport.models"; import type { EquipmentViewModel } from "./equipment/equipment.models"; import type { MaintenanceViewModel } from "./maintenance.models"; import type { VehicleViewModel } from "./vehicle/vehicle.models"; import type { WearableViewModel } from "./wearable/wearable.models"; export type RepairAssigned = { relatedId: string; } & ( | { assigned: "equipment"; related: EquipmentViewModel; } | { assigned: "vehicle"; related: VehicleViewModel; } | { assigned: "wearable"; related: WearableViewModel; } ); export type RepairViewModel = { id: string; createdAt: Date; finishedAt?: Date; status: string; responsible: string; description: string; images: string[]; reportDocument: string; reports: DamageReportViewModel[]; } & RepairAssigned; export interface CreateRepairViewModel { description: string; reportedBy: string; affectedId: string; affected: "equipment" | "vehicle" | "wearable"; } export interface UpdateRepairViewModel { id: string; status: string; noteByWorker: string; done: boolean; }