28 lines
382 B
Swift
28 lines
382 B
Swift
import Foundation
|
|
|
|
struct Cap: Codable {
|
|
|
|
let id: Int
|
|
|
|
let count: Int
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id = "i"
|
|
case count = "c"
|
|
}
|
|
}
|
|
|
|
struct CapImage: Equatable {
|
|
|
|
let cap: Int
|
|
|
|
let image: Int
|
|
}
|
|
|
|
extension CapImage: CustomStringConvertible {
|
|
|
|
var description: String {
|
|
"image \(image) of cap \(cap)"
|
|
}
|
|
}
|