This commit is contained in:
cdricms
2025-12-06 16:33:17 +01:00
parent 7be99711e1
commit 043de16a16
31 changed files with 594 additions and 1674 deletions

View File

@@ -0,0 +1,28 @@
public struct NutrientLevels: Sendable, Codable {
public enum Level: String, Sendable, Codable {
case high, moderate, low
}
public var fat: Level? = nil
public var salt: Level? = nil
public var saturatedFat: Level? = nil
public var sugars: Level? = nil
public enum CodingKeys: String, CodingKey {
case fat
case salt
case saturatedFat = "saturated-fat"
case sugars
}
public subscript(_ key: CodingKeys) -> Level? {
switch key {
case .fat: fat
case .salt: salt
case .saturatedFat: saturatedFat
case .sugars: sugars
}
}
}