Mercurial > public > geoquiz
comparison GeoQuiz/Models/CityModel.swift @ 26:425078c01194
refactor code
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Wed, 09 Nov 2022 10:30:01 +0100 |
parents | GeoQuiz/Logic/CityModel.swift@f140bb277c96 |
children |
comparison
equal
deleted
inserted
replaced
25:b3df0f5dc750 | 26:425078c01194 |
---|---|
1 // | |
2 // CityModel.swift | |
3 // GeoQuiz | |
4 // | |
5 // Created by Dennis Concepción Martín on 29/9/22. | |
6 // | |
7 | |
8 import Foundation | |
9 | |
10 struct CityModel: Codable { | |
11 let cities: [String: City] | |
12 | |
13 struct City: Codable, Equatable { | |
14 let country: String | |
15 let lat: Double | |
16 let lon: Double | |
17 | |
18 static func ==(lhs: City, rhs: City) -> Bool { | |
19 lhs.country == rhs.country | |
20 } | |
21 } | |
22 } |