Mercurial > public > geoquiz
view GeoQuiz/Models/CountryModel.swift @ 6:1946bbfde4af
reformat data structures
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Thu, 29 Sep 2022 12:00:17 +0200 |
parents | |
children |
line wrap: on
line source
// // CountryModel.swift // GeoQuiz // // Created by Dennis Concepción Martín on 29/9/22. // import Foundation struct CountryModel: Codable { let countries: [String: CountryData] struct CountryData: Codable, Equatable, Hashable { let flag: String let currency: String let population: Int let capital: String static func ==(lhs: CountryData, rhs: CountryData) -> Bool { lhs.flag == rhs.flag && lhs.currency == rhs.currency && lhs.population == rhs.population && lhs.capital == rhs.capital } } }