feat: Initial commit
This commit is contained in:
42
Sources/Routes/MoldRisk.swift
Normal file
42
Sources/Routes/MoldRisk.swift
Normal file
@@ -0,0 +1,42 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user