43 lines
1.1 KiB
Swift
43 lines
1.1 KiB
Swift
import Foundation
|
|
import PsychrometricClient
|
|
|
|
public enum MoldRisk {
|
|
public struct Request: Codable, Equatable, Sendable {
|
|
|
|
public let temperature: DryBulb
|
|
public let humidity: RelativeHumidity
|
|
|
|
public init(temperature: DryBulb, humidity: RelativeHumidity) {
|
|
self.temperature = temperature
|
|
self.humidity = humidity
|
|
}
|
|
}
|
|
|
|
public struct Response: Codable, Equatable, Sendable {
|
|
|
|
public let psychrometricProperties: PsychrometricProperties
|
|
public let riskLevel: RiskLevel
|
|
public let daysToMold: Int?
|
|
public let recommendations: [String]
|
|
|
|
public init(
|
|
psychrometricProperties: PsychrometricProperties,
|
|
riskLevel: MoldRisk.RiskLevel,
|
|
daysToMold: Int? = nil,
|
|
recommendations: [String]
|
|
) {
|
|
self.psychrometricProperties = psychrometricProperties
|
|
self.riskLevel = riskLevel
|
|
self.daysToMold = daysToMold
|
|
self.recommendations = recommendations
|
|
}
|
|
}
|
|
|
|
public enum RiskLevel: String, Codable, Equatable, Sendable {
|
|
case low
|
|
case moderate
|
|
case high
|
|
case severe
|
|
}
|
|
}
|