feat: WIP
This commit is contained in:
50
Sources/Routes/Models/HeatingBalancePoint.swift
Normal file
50
Sources/Routes/Models/HeatingBalancePoint.swift
Normal file
@@ -0,0 +1,50 @@
|
||||
public enum HeatingBalancePoint {
|
||||
|
||||
public enum Mode: String, CaseIterable, Codable, Equatable, Sendable {
|
||||
case thermal
|
||||
}
|
||||
|
||||
public enum Request: Codable, Equatable, Sendable {
|
||||
case thermal(Thermal)
|
||||
|
||||
public struct Thermal: Codable, Equatable, Sendable {
|
||||
|
||||
public let systemSize: Double
|
||||
public let capacityAt47: Double?
|
||||
public let capacityAt17: Double?
|
||||
public let heatingDesignTemperature: Double
|
||||
public let buildingHeatLoss: Double
|
||||
|
||||
public init(
|
||||
systemSize: Double,
|
||||
capacityAt47: Double? = nil,
|
||||
capacityAt17: Double? = nil,
|
||||
heatingDesignTemperature: Double,
|
||||
buildingHeatLoss: Double
|
||||
) {
|
||||
self.systemSize = systemSize
|
||||
self.capacityAt47 = capacityAt47
|
||||
self.capacityAt17 = capacityAt17
|
||||
self.heatingDesignTemperature = heatingDesignTemperature
|
||||
self.buildingHeatLoss = buildingHeatLoss
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum Response: Codable, Equatable, Sendable {
|
||||
case thermal(Thermal)
|
||||
|
||||
public struct Thermal: Codable, Equatable, Sendable {
|
||||
|
||||
public let capacityAt47: Double
|
||||
public let capacityAt17: Double
|
||||
public let balancePointTemperature: Double
|
||||
|
||||
public init(capacityAt47: Double, capacityAt17: Double, balancePointTemperature: Double) {
|
||||
self.capacityAt47 = capacityAt47
|
||||
self.capacityAt17 = capacityAt17
|
||||
self.balancePointTemperature = balancePointTemperature
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user