2025-05-28 18:30:00 +02:00
|
|
|
import { EquipmentViewModel } from "./equipment/equipment.models";
|
2025-05-28 22:51:17 +02:00
|
|
|
import { MaintenanceViewModel } from "./maintenance.models";
|
2025-05-28 18:30:00 +02:00
|
|
|
import { VehicleViewModel } from "./vehicle/vehicle.models";
|
|
|
|
import { WearableViewModel } from "./wearable/wearable.models";
|
2025-05-24 11:30:58 +02:00
|
|
|
|
2025-05-28 18:30:00 +02:00
|
|
|
export type DamageReportAssigned = {
|
2025-05-24 11:30:58 +02:00
|
|
|
relatedId: string;
|
2025-05-24 13:51:38 +02:00
|
|
|
} & (
|
|
|
|
| {
|
|
|
|
assigned: "equipment";
|
|
|
|
related: EquipmentViewModel;
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
assigned: "vehicle";
|
|
|
|
related: VehicleViewModel;
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
assigned: "wearable";
|
|
|
|
related: WearableViewModel;
|
|
|
|
}
|
|
|
|
);
|
2025-05-24 11:30:58 +02:00
|
|
|
|
2025-05-28 18:30:00 +02:00
|
|
|
export type DamageReportViewModel = {
|
|
|
|
id: string;
|
2025-05-28 22:51:17 +02:00
|
|
|
reportedAt: Date;
|
2025-05-28 18:30:00 +02:00
|
|
|
status: string;
|
|
|
|
done: boolean;
|
|
|
|
description: string;
|
|
|
|
imageCount: number;
|
|
|
|
reportedBy: string;
|
2025-05-28 22:51:17 +02:00
|
|
|
maintenance?: MaintenanceViewModel;
|
2025-05-28 18:30:00 +02:00
|
|
|
} & DamageReportAssigned;
|