type safetiy
This commit is contained in:
parent
9b2ab1923e
commit
30baca2567
3 changed files with 37 additions and 9 deletions
|
@ -5,7 +5,7 @@ import type {
|
|||
} from "../inspectionPlan/inspectionPlan.models";
|
||||
import type { VehicleViewModel } from "../vehicle/vehicle.models";
|
||||
|
||||
export interface InspectionViewModel {
|
||||
export type InspectionViewModel = {
|
||||
id: string;
|
||||
inspectionPlanId: string;
|
||||
inspectionPlan: InspectionPlanViewModel;
|
||||
|
@ -18,8 +18,16 @@ export interface InspectionViewModel {
|
|||
nextInspection?: Date;
|
||||
checks: Array<InspectionPointResultViewModel>;
|
||||
relatedId: string;
|
||||
related: EquipmentViewModel | VehicleViewModel;
|
||||
}
|
||||
} & (
|
||||
| {
|
||||
assigned: "equipment";
|
||||
related: EquipmentViewModel;
|
||||
}
|
||||
| {
|
||||
assigned: "vehicle";
|
||||
related: VehicleViewModel;
|
||||
}
|
||||
);
|
||||
|
||||
export interface InspectionPointViewModel {
|
||||
id: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue