view models and data structure

This commit is contained in:
Julian Krauser 2025-03-26 12:45:14 +01:00
parent 45fe7b34c3
commit 5faa4b7906
37 changed files with 157 additions and 516 deletions

View file

@ -1,39 +1,20 @@
import type { EquipmentViewModel } from "../equipment/equipment.models";
export interface DamageReportViewModel {
id: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface DamageReportStatisticsViewModel {
id: string;
salutation: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
todayAge: number;
ageThisYear: number;
exactAge: string;
reported: Date;
status: string;
description: string;
affectedEquipmentId: string;
affectedEquipment: EquipmentViewModel;
}
export interface CreateDamageReportViewModel {
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
description: string;
affectedEquipmentId: string;
}
export interface UpdateDamageReportViewModel {
id: string;
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
status: string;
}

View file

@ -0,0 +1,25 @@
import type { EquipmentTypeViewModel } from "../equipmentType/equipmentType.models";
export interface EquipmentViewModel {
id: string;
code: string;
name: string;
location: string;
equipmentTypeId: string;
equipmentType: EquipmentTypeViewModel;
}
export interface CreateEquipmentViewModel {
code: string;
name: string;
location: string;
equipmentTypeId: string;
}
export interface UpdateEquipmentViewModel {
id: string;
code: string;
name: string;
location: string;
equipmentTypeId: string;
}

View file

@ -1,39 +0,0 @@
export interface EquipmentTypeViewModel {
id: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface EquipmentTypeStatisticsViewModel {
id: string;
salutation: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
todayAge: number;
ageThisYear: number;
exactAge: string;
}
export interface CreateEquipmentTypeViewModel {
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface UpdateEquipmentTypeViewModel {
id: string;
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}

View file

@ -1,39 +0,0 @@
export interface EquipmentViewModel {
id: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface EquipmentStatisticsViewModel {
id: string;
salutation: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
todayAge: number;
ageThisYear: number;
exactAge: string;
}
export interface CreateEquipmentViewModel {
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface UpdateEquipmentViewModel {
id: string;
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}

View file

@ -0,0 +1,20 @@
export interface EquipmentTypeViewModel {
id: string;
type: string;
description: string;
inspectionInterval: `${number}${"d" | "m" | "y"}`;
// attached inspection plans
}
export interface CreateEquipmentTypeViewModel {
type: string;
description: string;
inspectionInterval: `${number}${"d" | "m" | "y"}`;
}
export interface UpdateEquipmentTypeViewModel {
id: string;
type: string;
description: string;
inspectionInterval: `${number}${"d" | "m" | "y"}`;
}

View file

@ -1,39 +1,16 @@
import type { EquipmentViewModel } from "../equipment/equipment.models";
export interface RespiratoryGearViewModel {
id: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface RespiratoryGearStatisticsViewModel {
id: string;
salutation: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
todayAge: number;
ageThisYear: number;
exactAge: string;
equipmentId: string;
equipment: EquipmentViewModel;
}
export interface CreateRespiratoryGearViewModel {
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
equipmentId: string;
}
export interface UpdateRespiratoryGearViewModel {
id: string;
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
equipmentId: string;
}

View file

@ -1,39 +1,20 @@
export interface RespiratoryMissionViewModel {
id: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface RespiratoryMissionStatisticsViewModel {
id: string;
salutation: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
todayAge: number;
ageThisYear: number;
exactAge: string;
date: Date;
title: string;
description: string;
// refs to used respiratory gear and wearers
}
export interface CreateRespiratoryMissionViewModel {
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
date: Date;
title: string;
description: string;
}
export interface UpdateRespiratoryMissionViewModel {
id: string;
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
date: Date;
title: string;
description: string;
}

View file

@ -1,39 +1,16 @@
import type { MemberViewModel } from "../../club/member/member.models";
export interface RespiratoryWearerViewModel {
id: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface RespiratoryWearerStatisticsViewModel {
id: string;
salutation: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
todayAge: number;
ageThisYear: number;
exactAge: string;
memberId: string;
member: MemberViewModel;
}
export interface CreateRespiratoryWearerViewModel {
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
memberId: string;
}
export interface UpdateRespiratoryWearerViewModel {
id: string;
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
memberId: string;
}

View file

@ -1,39 +1,13 @@
export interface VehicleViewModel {
id: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
}
export interface VehicleStatisticsViewModel {
id: string;
salutation: string;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
todayAge: number;
ageThisYear: number;
exactAge: string;
name: string;
}
export interface CreateVehicleViewModel {
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
name: string;
}
export interface UpdateVehicleViewModel {
id: string;
salutationId: number;
firstname: string;
lastname: string;
nameaffix: string;
birthdate: Date;
internalId?: string;
name: string;
}