2025-05-13 12:16:39 +02:00
|
|
|
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
|
|
|
|
2025-04-11 14:14:11 +02:00
|
|
|
export interface InspectionPlanViewModel {
|
|
|
|
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[];
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
export interface CreateInspectionPlanViewModel {
|
|
|
|
title: string;
|
2025-05-13 12:16:39 +02:00
|
|
|
inspectionInterval: PlanTimeDefinition;
|
|
|
|
remindTime: PlanTimeDefinition;
|
2025-05-14 09:13:47 +02:00
|
|
|
typeId: string;
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
export interface InspectionPointViewModel {
|
|
|
|
id: string;
|
|
|
|
title: string;
|
|
|
|
description: string;
|
|
|
|
type: "iO-niO" | "text" | "number";
|
2025-04-11 14:14:11 +02:00
|
|
|
}
|
2025-05-13 10:11:26 +02:00
|
|
|
|
2025-05-14 09:13:47 +02:00
|
|
|
export interface InspectionViewModel {
|
2025-05-13 10:11:26 +02:00
|
|
|
id: string;
|
2025-05-14 09:13:47 +02:00
|
|
|
inspectionPlanId: string;
|
|
|
|
inspectionPlan: InspectionPlanViewModel;
|
2025-05-13 12:16:39 +02:00
|
|
|
inspectionVersionedPlanId: string;
|
|
|
|
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
|
|
|
context: string;
|
|
|
|
created: Date;
|
|
|
|
finished?: Date;
|
|
|
|
isOpen: boolean;
|
|
|
|
nextInspection?: Date;
|
2025-05-14 09:13:47 +02:00
|
|
|
checks: Array<InspectionPointResultViewModel>;
|
2025-05-13 10:11:26 +02:00
|
|
|
}
|
|
|
|
|
2025-05-14 09:13:47 +02:00
|
|
|
export interface InspectionPointResultViewModel {
|
2025-05-13 10:11:26 +02:00
|
|
|
inspectionId: string;
|
2025-05-13 12:16:39 +02:00
|
|
|
inspectionVersionedPlanId: string;
|
|
|
|
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
2025-05-13 10:11:26 +02:00
|
|
|
inspectionPointId: string;
|
2025-05-13 12:16:39 +02:00
|
|
|
inspectionPoint: InspectionPointViewModel;
|
2025-05-13 10:11:26 +02:00
|
|
|
value: string;
|
|
|
|
}
|