Skip to content

Instantly share code, notes, and snippets.

@DhavalDobariya86
Last active June 7, 2020 18:53
Show Gist options
  • Save DhavalDobariya86/8497f78e730c9e6a346eaf6633f681b8 to your computer and use it in GitHub Desktop.
Save DhavalDobariya86/8497f78e730c9e6a346eaf6633f681b8 to your computer and use it in GitHub Desktop.
MVVM-C Model
import Foundation
struct Country: Codable, Equatable, CountryListItemRepresentable, CountryDetailRepresentable {
let name: String
let capital: String
let region: String
let subregion: String
let timezones: [String]
let borders: [String]
let currencies: [Currency]
let languages: [Language]
}
// MARK: - Currency
struct Currency: Codable, Equatable {
let code: String
let name: String
let symbol: String
}
// MARK: - Language
struct Language: Codable, Equatable {
let iso6391: String
let iso6392: String
let name: String
let nativeName: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment