41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
import type { EquipmentViewModel } from "../equipment/equipment.models";
|
|
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
|
|
import type { InspectionPointViewModel } from "../inspection/inspection.models";
|
|
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
|
import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
|
|
|
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
|
|
|
export interface InspectionPlanViewModel {
|
|
id: string;
|
|
title: string;
|
|
inspectionInterval: PlanTimeDefinition;
|
|
remindTime: PlanTimeDefinition;
|
|
version: number;
|
|
created: Date;
|
|
inspectionPoints: InspectionPointViewModel[];
|
|
relatedId: string;
|
|
related: EquipmentTypeViewModel | VehicleTypeViewModel;
|
|
}
|
|
|
|
export interface InspectionVersionedPlanViewModel {
|
|
id: string;
|
|
version: number;
|
|
created: Date;
|
|
inspectionPoints: InspectionPointViewModel[];
|
|
}
|
|
|
|
export interface CreateInspectionPlanViewModel {
|
|
title: string;
|
|
inspectionInterval: PlanTimeDefinition;
|
|
remindTime: PlanTimeDefinition;
|
|
relatedId: string;
|
|
assigned: "vehicle" | "equipment";
|
|
}
|
|
|
|
export interface UpdateInspectionPlanViewModel {
|
|
id: string;
|
|
title: string;
|
|
inspectionInterval: PlanTimeDefinition;
|
|
remindTime?: PlanTimeDefinition;
|
|
}
|