2025-05-14 14:42:00 +02:00
|
|
|
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
|
|
|
|
import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
|
|
|
|
2025-05-13 12:16:39 +02:00
|
|
|
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
|
|
|
|
2025-05-24 11:40:10 +02:00
|
|
|
export type InspectionPlanViewModel = {
|
2025-04-11 14:14:11 +02:00
|
|
|
id: string;
|
|
|
|
title: string;
|
2025-05-13 12:16:39 +02:00
|
|
|
inspectionInterval: PlanTimeDefinition;
|
|
|
|
remindTime: PlanTimeDefinition;
|
2025-04-28 12:29:44 +02:00
|
|
|
version: number;
|
2025-05-13 12:16:39 +02:00
|
|
|
created: Date;
|
|
|
|
inspectionPoints: InspectionPointViewModel[];
|
2025-05-14 14:42:00 +02:00
|
|
|
relatedId: string;
|
2025-05-24 11:40:10 +02:00
|
|
|
} & (
|
|
|
|
| {
|
|
|
|
assigned: "equipment";
|
2025-05-24 12:55:24 +02:00
|
|
|
related: EquipmentTypeViewModel;
|
2025-05-24 11:40:10 +02:00
|
|
|
}
|
|
|
|
| {
|
|
|
|
assigned: "vehicle";
|
2025-05-24 12:55:24 +02:00
|
|
|
related: VehicleTypeViewModel;
|
2025-05-24 11:40:10 +02:00
|
|
|
}
|
|
|
|
);
|
2025-05-13 12:16:39 +02:00
|
|
|
|
|
|
|
export interface InspectionVersionedPlanViewModel {
|
|
|
|
id: string;
|
|
|
|
version: number;
|
|
|
|
created: Date;
|
2025-04-28 12:29:44 +02:00
|
|
|
inspectionPoints: InspectionPointViewModel[];
|
2025-04-11 14:14:11 +02:00
|
|
|
}
|
|
|
|
|
2025-05-24 12:55:24 +02:00
|
|
|
export interface InspectionPointViewModel {
|
|
|
|
id: string;
|
|
|
|
title: string;
|
|
|
|
description: string;
|
|
|
|
type: "iO-niO" | "text" | "number";
|
|
|
|
min?: number;
|
|
|
|
}
|
|
|
|
|
2025-04-11 14:14:11 +02:00
|
|
|
export interface CreateInspectionPlanViewModel {
|
|
|
|
title: string;
|
2025-05-13 12:16:39 +02:00
|
|
|
inspectionInterval: PlanTimeDefinition;
|
|
|
|
remindTime: PlanTimeDefinition;
|
2025-05-14 14:42:00 +02:00
|
|
|
relatedId: string;
|
2025-05-14 09:13:47 +02:00
|
|
|
assigned: "vehicle" | "equipment";
|
2025-04-11 14:14:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface UpdateInspectionPlanViewModel {
|
|
|
|
id: string;
|
|
|
|
title: string;
|
2025-05-13 12:16:39 +02:00
|
|
|
inspectionInterval: PlanTimeDefinition;
|
|
|
|
remindTime?: PlanTimeDefinition;
|
2025-04-28 12:29:44 +02:00
|
|
|
}
|