Add cap color to model

This commit is contained in:
Christoph Hagen 2022-05-27 09:24:48 +02:00
parent 3f4202d9ad
commit f14da6bafc

View File

@ -11,7 +11,9 @@ struct Cap: Codable {
var mainImage: Int
/// The version of the first classifier trained on this cap
var classifierVersion: Int
var classifierVersion: Int?
var color: Color?
enum CodingKeys: String, CodingKey {
case id = "i"
@ -19,6 +21,16 @@ struct Cap: Codable {
case count = "c"
case mainImage = "m"
case classifierVersion = "v"
case color = "f"
}
struct Color: Codable, Equatable {
let r: Int
let g: Int
let b: Int
}
}