ff-admin-server/src/viewmodel/admin/unit/damageReport/damageReport.models.ts

39 lines
867 B
TypeScript
Raw Normal View History

2025-05-24 11:30:58 +02:00
import type { EquipmentViewModel } from "../equipment/equipment.models";
import type { VehicleViewModel } from "../vehicle/vehicle.models";
import type { WearableViewModel } from "../wearable/wearable.models";
2025-05-24 13:51:38 +02:00
export type DamageReportViewModel = {
2025-05-24 11:30:58 +02:00
id: string;
reported: Date;
status: string;
done: boolean;
description: string;
providedImage: Array<string>;
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
export interface CreateDamageReportViewModel {
description: string;
affectedId: string;
affected: "equipment" | "vehicle" | "wearable";
}
export interface UpdateDamageReportViewModel {
id: string;
status: string;
done: boolean;
}