38 lines
1.2 KiB
Swift
38 lines
1.2 KiB
Swift
import ComposableArchitecture
|
|
import SharedModels
|
|
|
|
|
|
struct SharedSettings: Equatable {
|
|
var budgets: BudgetedPercentEnvelope?
|
|
var coolingCapacity: CoolingCapacity
|
|
var equipmentMeasurement: EquipmentMeasurement?
|
|
var fanType: FanType
|
|
var flaggedEquipmentMeasurement: FlaggedEquipmentMeasurement?
|
|
var heatingCapacity: Double?
|
|
var ratedStaticPressures: RatedStaticPressures
|
|
|
|
init(
|
|
budgets: BudgetedPercentEnvelope? = nil,
|
|
coolingCapacity: CoolingCapacity = .default,
|
|
equipmentMeasurement: EquipmentMeasurement? = nil,
|
|
fanType: FanType = .constantSpeed,
|
|
flaggedEquipmentMeasurement: FlaggedEquipmentMeasurement? = nil,
|
|
heatingCapacity: Double? = nil,
|
|
ratedStaticPressures: RatedStaticPressures = .init()
|
|
) {
|
|
self.budgets = budgets
|
|
self.coolingCapacity = coolingCapacity
|
|
self.equipmentMeasurement = equipmentMeasurement
|
|
self.fanType = fanType
|
|
self.flaggedEquipmentMeasurement = flaggedEquipmentMeasurement
|
|
self.heatingCapacity = heatingCapacity
|
|
self.ratedStaticPressures = ratedStaticPressures
|
|
}
|
|
}
|
|
|
|
extension PersistenceReaderKey where Self == InMemoryKey<SharedSettings> {
|
|
static var sharedSettings: Self {
|
|
.inMemory("sharedSettings")
|
|
}
|
|
}
|