update inspection schema
This commit is contained in:
parent
05555425ce
commit
8766bbce08
10 changed files with 126 additions and 50 deletions
|
@ -1,12 +1,23 @@
|
|||
import type InspectionPlan from "../../../../views/admin/unit/inspectionPlan/InspectionPlan.vue";
|
||||
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
|
||||
|
||||
export type PlanTimeDefinition = `${number}-${"d" | "m" | "y"}` | `${number}/${number | "*"}`;
|
||||
|
||||
export interface InspectionPlanViewModel {
|
||||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
remindTime: PlanTimeDefinition;
|
||||
version: number;
|
||||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
equipmentTypeId: string;
|
||||
equipmentType: EquipmentTypeViewModel;
|
||||
}
|
||||
|
||||
export interface InspectionVersionedPlanViewModel {
|
||||
id: string;
|
||||
version: number;
|
||||
created: Date;
|
||||
inspectionPoints: InspectionPointViewModel[];
|
||||
equipmentTypeId: string;
|
||||
equipmentType: EquipmentTypeViewModel;
|
||||
|
@ -14,16 +25,16 @@ export interface InspectionPlanViewModel {
|
|||
|
||||
export interface CreateInspectionPlanViewModel {
|
||||
title: string;
|
||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
remindTime: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
remindTime: PlanTimeDefinition;
|
||||
equipmentTypeId: string;
|
||||
}
|
||||
|
||||
export interface UpdateInspectionPlanViewModel {
|
||||
id: string;
|
||||
title: string;
|
||||
inspectionInterval: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
remindTime?: `${number}-${"d" | "m" | "y"}` | `${number}/${number}` | `${number}/*`;
|
||||
inspectionInterval: PlanTimeDefinition;
|
||||
remindTime?: PlanTimeDefinition;
|
||||
}
|
||||
|
||||
export interface InspectionPointViewModel {
|
||||
|
@ -35,16 +46,21 @@ export interface InspectionPointViewModel {
|
|||
|
||||
export interface InspectionViewMoel {
|
||||
id: string;
|
||||
inspectionPlanId: string;
|
||||
date: Date;
|
||||
status: "open" | "finished";
|
||||
results: Array<InspectionPointResultViewMoel>;
|
||||
inspectionVersionedPlanId: string;
|
||||
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
||||
context: string;
|
||||
created: Date;
|
||||
finished?: Date;
|
||||
isOpen: boolean;
|
||||
nextInspection?: Date;
|
||||
checks: Array<InspectionPointResultViewMoel>;
|
||||
}
|
||||
|
||||
export interface InspectionPointResultViewMoel {
|
||||
id: string;
|
||||
inspectionId: string;
|
||||
inspectionPlanId: string;
|
||||
inspectionVersionedPlanId: string;
|
||||
inspectionVersionedPlan: InspectionVersionedPlanViewModel;
|
||||
inspectionPointId: string;
|
||||
inspectionPoint: InspectionPointViewModel;
|
||||
value: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue