ff-admin/src/viewmodels/admin/unit/inspectionPlan/inspectionPlan.models.ts

42 lines
1.3 KiB
TypeScript
Raw Normal View History

2025-05-14 14:42:00 +02:00
import type { EquipmentViewModel } from "../equipment/equipment.models";
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
2025-05-16 10:27:08 +02:00
import type { InspectionPointViewModel } from "../inspection/inspection.models";
2025-05-14 14:42:00 +02:00
import type { VehicleViewModel } from "../vehicle/vehicle.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-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[];
2025-05-14 14:42:00 +02:00
relatedId: string;
related: EquipmentTypeViewModel | VehicleTypeViewModel;
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
}
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
}