type safetiy
This commit is contained in:
parent
9b2ab1923e
commit
30baca2567
3 changed files with 37 additions and 9 deletions
|
@ -6,7 +6,7 @@ import type { VehicleTypeViewModel } from "../vehicleType/vehicleType.models";
|
|||
|
||||
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
||||
|
||||
export interface InspectionPlanViewModel {
|
||||
export type InspectionPlanViewModel = {
|
||||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
|
@ -16,7 +16,16 @@ export interface InspectionPlanViewModel {
|
|||
inspectionPoints: InspectionPointViewModel[];
|
||||
relatedId: string;
|
||||
related: EquipmentTypeViewModel | VehicleTypeViewModel;
|
||||
}
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleViewModel;
|
||||
}
|
||||
);
|
||||
|
||||
export interface InspectionVersionedPlanViewModel {
|
||||
id: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue