You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1285 lines
13 KiB

//
// NativeCountry.swift
// GME Remit
//
// Created by InKwon James Kim on 26/07/2019.
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
//
import ObjectMapper
struct StaticModels {
private let nativeCountryOrigin = NativeCountryContainer(JSONString: countries)
let nativeCountries: [NativeCountryModel]
init() {
nativeCountries = nativeCountryOrigin!.nativeCountries
}
}
struct NativeCountryContainer: Mappable {
var nativeCountries = [NativeCountryModel]()
init?(map: Map) { }
mutating func mapping(map: Map) {
nativeCountries <- map["NativeCountry"]
}
}
struct NativeCountryModel: Mappable, TablePresenterProtocol {
var id: String = ""
var text: String = ""
var code: String = ""
var cellTitle: String? {
return text
}
var cellImage: UIImage? {
// return CountryEnum(rawValue: code.lowercased())?.flag ?? #imageLiteral(resourceName: "flag_default")
return nil
}
init?(map: Map) {}
mutating func mapping(map: Map) {
id <- map["id"]
text <- map["text"]
code <- map["code"]
}
}
private let countries =
"""
{
"NativeCountry":[
{
"id":"2",
"text":"Afghanistan",
"code":"AF"
},
{
"id":"75",
"text":"Åland Islands",
"code":"AX"
},
{
"id":"3",
"text":"Albania",
"code":"AL"
},
{
"id":"5",
"text":"Algeria",
"code":"DZ"
},
{
"id":"6",
"text":"American Samoa",
"code":"AS"
},
{
"id":"7",
"text":"Andorra",
"code":"AD"
},
{
"id":"8",
"text":"Angola",
"code":"AO"
},
{
"id":"189",
"text":"Anguilla",
"code":"AI"
},
{
"id":"4",
"text":"Antarctica",
"code":"AQ"
},
{
"id":"9",
"text":"Antigua and Barbuda",
"code":"AG"
},
{
"id":"11",
"text":"Argentina",
"code":"AR"
},
{
"id":"17",
"text":"Armenia",
"code":"AM"
},
{
"id":"154",
"text":"Aruba",
"code":"AW"
},
{
"id":"12",
"text":"Australia",
"code":"AU"
},
{
"id":"13",
"text":"Austria",
"code":"AT"
},
{
"id":"10",
"text":"Azerbaijan",
"code":"AZ"
},
{
"id":"14",
"text":"Bahamas",
"code":"BS"
},
{
"id":"15",
"text":"Bahrain",
"code":"BH"
},
{
"id":"16",
"text":"Bangladesh",
"code":"BD"
},
{
"id":"18",
"text":"Barbados",
"code":"BB"
},
{
"id":"35",
"text":"Belarus",
"code":"BY"
},
{
"id":"19",
"text":"Belgium",
"code":"BE"
},
{
"id":"27",
"text":"Belize",
"code":"BZ"
},
{
"id":"60",
"text":"Benin",
"code":"BJ"
},
{
"id":"20",
"text":"Bermuda",
"code":"BM"
},
{
"id":"21",
"text":"Bhutan",
"code":"BT"
},
{
"id":"22",
"text":"Bolivia",
"code":"BO"
},
{
"id":"23",
"text":"Bosnia and Herzegovina",
"code":"BA"
},
{
"id":"24",
"text":"Botswana",
"code":"BW"
},
{
"id":"25",
"text":"Bouvet Island",
"code":"BV"
},
{
"id":"26",
"text":"Brazil",
"code":"BR"
},
{
"id":"28",
"text":"British Indian Ocean Territory",
"code":"IO"
},
{
"id":"31",
"text":"Brunei",
"code":"BN"
},
{
"id":"32",
"text":"Bulgaria",
"code":"BG"
},
{
"id":"240",
"text":"Burkina Faso",
"code":"BF"
},
{
"id":"34",
"text":"Burundi",
"code":"BI"
},
{
"id":"36",
"text":"Cambodia",
"code":"KH"
},
{
"id":"37",
"text":"Cameroon",
"code":"CM"
},
{
"id":"38",
"text":"Canada",
"code":"CA"
},
{
"id":"39",
"text":"Cape Verde",
"code":"CV"
},
{
"id":"40",
"text":"Cayman Islands",
"code":"KY"
},
{
"id":"41",
"text":"Central African Republic",
"code":"CF"
},
{
"id":"43",
"text":"Chad",
"code":"TD"
},
{
"id":"44",
"text":"Chile",
"code":"CL"
},
{
"id":"45",
"text":"China",
"code":"CN"
},
{
"id":"47",
"text":"Christmas Island",
"code":"CX"
},
{
"id":"48",
"text":"Cocos (Keeling) Islands",
"code":"CC"
},
{
"id":"49",
"text":"Colombia",
"code":"CO"
},
{
"id":"50",
"text":"Comoros",
"code":"KM"
},
{
"id":"52",
"text":"Congo",
"code":"CG"
},
{
"id":"53",
"text":"Congo, Democratic Republic of the",
"code":"CD"
},
{
"id":"54",
"text":"Cook Islands",
"code":"CK"
},
{
"id":"55",
"text":"Costa Rica",
"code":"CR"
},
{
"id":"111",
"text":"Côte d'Ivoire",
"code":"CI"
},
{
"id":"56",
"text":"Croatia",
"code":"HR"
},
{
"id":"57",
"text":"Cuba",
"code":"CU"
},
{
"id":"58",
"text":"Cyprus",
"code":"CY"
},
{
"id":"59",
"text":"Czech Republic",
"code":"CZ"
},
{
"id":"61",
"text":"Denmark",
"code":"DK"
},
{
"id":"80",
"text":"Djibouti",
"code":"DJ"
},
{
"id":"62",
"text":"Dominica",
"code":"DM"
},
{
"id":"63",
"text":"Dominican Republic",
"code":"DO"
},
{
"id":"64",
"text":"Ecuador",
"code":"EC"
},
{
"id":"232",
"text":"Egypt",
"code":"EG"
},
{
"id":"65",
"text":"El Salvador",
"code":"SV"
},
{
"id":"66",
"text":"Equatorial Guinea",
"code":"GQ"
},
{
"id":"68",
"text":"Eritrea",
"code":"ER"
},
{
"id":"69",
"text":"Estonia",
"code":"EE"
},
{
"id":"67",
"text":"Ethiopia",
"code":"ET"
},
{
"id":"71",
"text":"Falkland Islands (Malvinas)",
"code":"FK"
},
{
"id":"70",
"text":"Faroe Islands",
"code":"FO"
},
{
"id":"73",
"text":"Fiji",
"code":"FJ"
},
{
"id":"74",
"text":"Finland",
"code":"FI"
},
{
"id":"76",
"text":"France",
"code":"FR"
},
{
"id":"77",
"text":"French Guiana",
"code":"GF"
},
{
"id":"78",
"text":"French Polynesia",
"code":"PF"
},
{
"id":"79",
"text":"French Southern Territories",
"code":"TF"
},
{
"id":"81",
"text":"Gabon",
"code":"GA"
},
{
"id":"83",
"text":"Gambia",
"code":"GM"
},
{
"id":"82",
"text":"Georgia",
"code":"GE"
},
{
"id":"85",
"text":"Germany",
"code":"DE"
},
{
"id":"86",
"text":"Ghana",
"code":"GH"
},
{
"id":"87",
"text":"Gibraltar",
"code":"GI"
},
{
"id":"89",
"text":"Greece",
"code":"GR"
},
{
"id":"90",
"text":"Greenland",
"code":"GL"
},
{
"id":"91",
"text":"Grenada",
"code":"GD"
},
{
"id":"92",
"text":"Guadeloupe",
"code":"GP"
},
{
"id":"93",
"text":"Guam",
"code":"GU"
},
{
"id":"94",
"text":"Guatemala",
"code":"GT"
},
{
"id":"234",
"text":"Guernsey",
"code":"GG"
},
{
"id":"95",
"text":"Guinea",
"code":"GN"
},
{
"id":"178",
"text":"Guinea-Bissau",
"code":"GW"
},
{
"id":"96",
"text":"Guyana",
"code":"GY"
},
{
"id":"97",
"text":"Haiti",
"code":"HT"
},
{
"id":"98",
"text":"Heard Island and McDonald Islands",
"code":"HM"
},
{
"id":"99",
"text":"Holy See (Vatican City State)",
"code":"VA"
},
{
"id":"100",
"text":"Honduras",
"code":"HN"
},
{
"id":"101",
"text":"Hong Kong",
"code":"HK"
},
{
"id":"102",
"text":"Hungary",
"code":"HU"
},
{
"id":"103",
"text":"Iceland",
"code":"IS"
},
{
"id":"104",
"text":"India",
"code":"IN"
},
{
"id":"105",
"text":"Indonesia",
"code":"ID"
},
{
"id":"107",
"text":"Iraq",
"code":"IQ"
},
{
"id":"108",
"text":"Ireland",
"code":"IE"
},
{
"id":"236",
"text":"Isle of Man",
"code":"IM"
},
{
"id":"109",
"text":"Israel",
"code":"IL"
},
{
"id":"110",
"text":"Italy",
"code":"IT"
},
{
"id":"112",
"text":"Jamaica",
"code":"JM"
},
{
"id":"113",
"text":"Japan",
"code":"JP"
},
{
"id":"235",
"text":"Jersey",
"code":"JE"
},
{
"id":"115",
"text":"Jordan",
"code":"JO"
},
{
"id":"114",
"text":"Kazakhstan",
"code":"KZ"
},
{
"id":"116",
"text":"Kenya",
"code":"KE"
},
{
"id":"88",
"text":"Kiribati",
"code":"KI"
},
{
"id":"119",
"text":"Kuwait",
"code":"KW"
},
{
"id":"120",
"text":"Kyrgyzstan",
"code":"KG"
},
{
"id":"121",
"text":"Laos",
"code":"LA"
},
{
"id":"124",
"text":"Latvia",
"code":"LV"
},
{
"id":"122",
"text":"Lebanon",
"code":"LB"
},
{
"id":"123",
"text":"Lesotho",
"code":"LS"
},
{
"id":"125",
"text":"Liberia",
"code":"LR"
},
{
"id":"126",
"text":"Libyan Arab Jamahiriya",
"code":"LY"
},
{
"id":"127",
"text":"Liechtenstein",
"code":"LI"
},
{
"id":"128",
"text":"Lithuania",
"code":"LT"
},
{
"id":"129",
"text":"Luxembourg",
"code":"LU"
},
{
"id":"130",
"text":"Macao",
"code":"MO"
},
{
"id":"231",
"text":"Macedonia",
"code":"MK"
},
{
"id":"131",
"text":"Madagascar",
"code":"MG"
},
{
"id":"132",
"text":"Malawi",
"code":"MW"
},
{
"id":"133",
"text":"Malaysia",
"code":"MY"
},
{
"id":"134",
"text":"Maldives",
"code":"MV"
},
{
"id":"135",
"text":"Mali",
"code":"ML"
},
{
"id":"136",
"text":"Malta",
"code":"MT"
},
{
"id":"167",
"text":"Marshall Islands",
"code":"MH"
},
{
"id":"137",
"text":"Martinique",
"code":"MQ"
},
{
"id":"138",
"text":"Mauritania",
"code":"MR"
},
{
"id":"139",
"text":"Mauritius",
"code":"MU"
},
{
"id":"51",
"text":"Mayotte",
"code":"YT"
},
{
"id":"140",
"text":"Mexico",
"code":"MX"
},
{
"id":"166",
"text":"Micronesia",
"code":"FM"
},
{
"id":"143",
"text":"Moldova",
"code":"MD"
},
{
"id":"141",
"text":"Monaco",
"code":"MC"
},
{
"id":"142",
"text":"Mongolia",
"code":"MN"
},
{
"id":"144",
"text":"Montenegro",
"code":"ME"
},
{
"id":"145",
"text":"Montserrat",
"code":"MS"
},
{
"id":"146",
"text":"Morocco",
"code":"MA"
},
{
"id":"147",
"text":"Mozambique",
"code":"MZ"
},
{
"id":"33",
"text":"Myanmar",
"code":"MM"
},
{
"id":"149",
"text":"Namibia",
"code":"NA"
},
{
"id":"150",
"text":"Nauru",
"code":"NR"
},
{
"id":"151",
"text":"Nepal",
"code":"NP"
},
{
"id":"152",
"text":"Netherlands",
"code":"NL"
},
{
"id":"153",
"text":"Netherlands Antilles",
"code":"AN"
},
{
"id":"155",
"text":"New Caledonia",
"code":"NC"
},
{
"id":"157",
"text":"New Zealand",
"code":"NZ"
},
{
"id":"158",
"text":"Nicaragua",
"code":"NI"
},
{
"id":"159",
"text":"Niger",
"code":"NE"
},
{
"id":"160",
"text":"Nigeria",
"code":"NG"
},
{
"id":"161",
"text":"Niue",
"code":"NU"
},
{
"id":"162",
"text":"Norfolk Island",
"code":"NF"
},
{
"id":"164",
"text":"Northern Mariana Islands",
"code":"MP"
},
{
"id":"163",
"text":"Norway",
"code":"NO"
},
{
"id":"148",
"text":"Oman",
"code":"OM"
},
{
"id":"169",
"text":"Pakistan",
"code":"PK"
},
{
"id":"168",
"text":"Palau",
"code":"PW"
},
{
"id":"84",
"text":"Palestinian Territory, Occupied",
"code":"PS"
},
{
"id":"170",
"text":"Panama",
"code":"PA"
},
{
"id":"171",
"text":"Papua New Guinea",
"code":"PG"
},
{
"id":"172",
"text":"Paraguay",
"code":"PY"
},
{
"id":"173",
"text":"Peru",
"code":"PE"
},
{
"id":"174",
"text":"Philippines",
"code":"PH"
},
{
"id":"175",
"text":"Pitcairn",
"code":"PN"
},
{
"id":"176",
"text":"Poland",
"code":"PL"
},
{
"id":"177",
"text":"Portugal",
"code":"PT"
},
{
"id":"180",
"text":"Puerto Rico",
"code":"PR"
},
{
"id":"181",
"text":"Qatar",
"code":"QA"
},
{
"id":"182",
"text":"Réunion",
"code":"RE"
},
{
"id":"183",
"text":"Romania",
"code":"RO"
},
{
"id":"184",
"text":"Russian Federation",
"code":"RU"
},
{
"id":"185",
"text":"Rwanda",
"code":"RW"
},
{
"id":"186",
"text":"Saint Barthélemy",
"code":"BL"
},
{
"id":"187",
"text":"Saint Helena",
"code":"SH"
},
{
"id":"188",
"text":"Saint Kitts and Nevis",
"code":"KN"
},
{
"id":"190",
"text":"Saint Lucia",
"code":"LC"
},
{
"id":"191",
"text":"Saint Martin (French part)",
"code":"MF"
},
{
"id":"192",
"text":"Saint Pierre and Miquelon",
"code":"PM"
},
{
"id":"193",
"text":"Saint Vincent and the Grenadines",
"code":"VC"
},
{
"id":"245",
"text":"Samoa",
"code":"WS"
},
{
"id":"194",
"text":"San Marino",
"code":"SM"
},
{
"id":"195",
"text":"Sao Tome and Principe",
"code":"ST"
},
{
"id":"196",
"text":"Saudi Arabia",
"code":"SA"
},
{
"id":"197",
"text":"Senegal",
"code":"SN"
},
{
"id":"198",
"text":"Serbia",
"code":"RS"
},
{
"id":"199",
"text":"Seychelles",
"code":"SC"
},
{
"id":"200",
"text":"Sierra Leone",
"code":"SL"
},
{
"id":"201",
"text":"Singapore",
"code":"SG"
},
{
"id":"202",
"text":"Slovakia",
"code":"SK"
},
{
"id":"204",
"text":"Slovenia",
"code":"SI"
},
{
"id":"29",
"text":"Solomon Islands",
"code":"SB"
},
{
"id":"205",
"text":"Somalia",
"code":"SO"
},
{
"id":"206",
"text":"South Africa",
"code":"ZA"
},
{
"id":"72",
"text":"South Georgia and the South Sandwich Islands",
"code":"GS"
},
{
"id":"118",
"text":"South Korea",
"code":"KR"
},
{
"id":"208",
"text":"Spain",
"code":"ES"
},
{
"id":"42",
"text":"Sri Lanka",
"code":"LK"
},
{
"id":"210",
"text":"Sudan",
"code":"SD"
},
{
"id":"211",
"text":"Suriname",
"code":"SR"
},
{
"id":"212",
"text":"Svalbard and Jan Mayen",
"code":"SJ"
},
{
"id":"213",
"text":"Swaziland",
"code":"SZ"
},
{
"id":"214",
"text":"Sweden",
"code":"SE"
},
{
"id":"215",
"text":"Switzerland",
"code":"CH"
},
{
"id":"216",
"text":"Syria",
"code":"SY"
},
{
"id":"46",
"text":"Taiwan",
"code":"TW"
},
{
"id":"217",
"text":"Tajikistan",
"code":"TJ"
},
{
"id":"237",
"text":"Tanzania",
"code":"TZ"
},
{
"id":"218",
"text":"Thailand",
"code":"TH"
},
{
"id":"249",
"text":"Third Party",
"code":"TP"
},
{
"id":"179",
"text":"Timor-Leste",
"code":"TL"
},
{
"id":"219",
"text":"Togo",
"code":"TG"
},
{
"id":"220",
"text":"Tokelau",
"code":"TK"
},
{
"id":"221",
"text":"Tonga",
"code":"TO"
},
{
"id":"222",
"text":"Trinidad and Tobago",
"code":"TT"
},
{
"id":"224",
"text":"Tunisia",
"code":"TN"
},
{
"id":"225",
"text":"Turkey",
"code":"TR"
},
{
"id":"226",
"text":"Turkmenistan",
"code":"TM"
},
{
"id":"227",
"text":"Turks and Caicos Islands",
"code":"TC"
},
{
"id":"228",
"text":"Tuvalu",
"code":"TV"
},
{
"id":"229",
"text":"Uganda",
"code":"UG"
},
{
"id":"230",
"text":"Ukraine",
"code":"UA"
},
{
"id":"223",
"text":"United Arab Emirates",
"code":"AE"
},
{
"id":"233",
"text":"United Kingdom",
"code":"UK"
},
{
"id":"238",
"text":"United States",
"code":"US"
},
{
"id":"165",
"text":"United States Minor Outlying Islands",
"code":"UM"
},
{
"id":"241",
"text":"Uruguay",
"code":"UY"
},
{
"id":"242",
"text":"Uzbekistan",
"code":"UZ"
},
{
"id":"156",
"text":"Vanuatu",
"code":"VU"
},
{
"id":"243",
"text":"Venezuela",
"code":"VE"
},
{
"id":"203",
"text":"Vietnam",
"code":"VN"
},
{
"id":"30",
"text":"Virgin Islands, British",
"code":"VG"
},
{
"id":"239",
"text":"Virgin Islands, U.S.",
"code":"VI"
},
{
"id":"244",
"text":"Wallis and Futuna",
"code":"WF"
},
{
"id":"209",
"text":"Western Sahara",
"code":"EH"
},
{
"id":"246",
"text":"Yemen",
"code":"YE"
},
{
"id":"247",
"text":"Zambia",
"code":"ZM"
},
{
"id":"207",
"text":"Zimbabwe",
"code":"ZW"
}
]
}
"""