leistungsbilanz-ts/src/frontend/types.ts

162 lines
3.3 KiB
TypeScript

export interface ProjectDto {
id: string;
name: string;
singlePhaseVoltageV: number;
threePhaseVoltageV: number;
}
export interface ConsumerWithCalculatedValues {
id: string;
projectId: string;
distributionBoardId?: string | null;
circuitListId?: string | null;
roomId?: string | null;
roomNumber?: string;
roomName?: string;
floorId?: string;
floorName?: string;
circuitNumber?: string;
description?: string;
name: string;
category?: string;
deviceType?: string;
phaseType?: string;
tradeOrCostGroup?: string;
group?: string;
protectionType?: string;
protectionRatedCurrent?: number;
protectionCharacteristic?: string;
cableType?: string;
cableCrossSection?: string;
comment?: string;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV?: number;
phaseCount?: 1 | 3;
powerFactor?: number;
note?: string;
installedPowerKw: number;
demandPowerKw: number;
effectiveVoltageV?: number;
currentA?: number;
}
export interface DistributionBoardDto {
id: string;
projectId: string;
name: string;
}
export interface CircuitListDto {
id: string;
projectId: string;
distributionBoardId: string;
name: string;
}
export interface FloorDto {
id: string;
projectId: string;
name: string;
sortOrder: number;
}
export interface RoomDto {
id: string;
projectId: string;
floorId: string | null;
roomNumber: string;
roomName: string;
}
export interface GlobalDeviceDto {
id: string;
name: string;
category: string | null;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV: number | null;
phaseCount: 1 | 3 | null;
powerFactor: number | null;
note: string | null;
}
export interface ProjectDeviceDto {
id: string;
projectId: string;
name: string;
category: string | null;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV: number | null;
phaseCount: 1 | 3 | null;
powerFactor: number | null;
note: string | null;
}
export interface CreateConsumerInput {
projectId: string;
distributionBoardId?: string;
circuitListId?: string;
roomId?: string;
circuitNumber?: string;
description?: string;
name: string;
category?: string;
deviceType?: string;
phaseType?: string;
tradeOrCostGroup?: string;
group?: string;
protectionType?: string;
protectionRatedCurrent?: number;
protectionCharacteristic?: string;
cableType?: string;
cableCrossSection?: string;
comment?: string;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV?: number;
phaseCount?: 1 | 3;
powerFactor?: number;
note?: string;
}
export interface UpdateConsumerInput extends CreateConsumerInput {}
export interface CreateFloorInput {
name: string;
}
export interface CreateRoomInput {
floorId?: string;
roomNumber: string;
roomName: string;
}
export interface CreateGlobalDeviceInput {
name: string;
category?: string;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV?: number;
phaseCount?: 1 | 3;
powerFactor?: number;
note?: string;
}
export interface CreateProjectDeviceInput {
name: string;
category?: string;
quantity: number;
installedPowerPerUnitKw: number;
demandFactor: number;
voltageV?: number;
phaseCount?: 1 | 3;
powerFactor?: number;
note?: string;
}