feat: WIP
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
import Elementary
|
||||
import ElementaryHTMX
|
||||
|
||||
public extension HTMLAttribute.hx {
|
||||
@Sendable
|
||||
static func get(route: SiteRoute.View) -> HTMLAttribute {
|
||||
get(SiteRoute.View.router.path(for: route))
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func patch(route: SiteRoute.View) -> HTMLAttribute {
|
||||
patch(SiteRoute.View.router.path(for: route))
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func post(route: SiteRoute.View) -> HTMLAttribute {
|
||||
post(SiteRoute.View.router.path(for: route))
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func put(route: SiteRoute.View) -> HTMLAttribute {
|
||||
put(SiteRoute.View.router.path(for: route))
|
||||
}
|
||||
|
||||
@Sendable
|
||||
static func delete(route: SiteRoute.Api) -> HTMLAttribute {
|
||||
delete(SiteRoute.Api.router.path(for: route))
|
||||
}
|
||||
}
|
||||
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