-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataModel.swift
40 lines (36 loc) · 998 Bytes
/
DataModel.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// DataModel.swift
// SupHealth
//
// Created by Yahia Berrada on 6/19/20.
// Copyright © 2020 Supinfo. All rights reserved.
//
import Foundation
//struct for the data model of a country
struct DataModel : Codable {
var Country: String
var CountryCode: String
var NewConfirmed: Int
var TotalConfirmed: Int
var NewDeaths: Int
var TotalDeaths: Int
var NewRecovered: Int
var TotalRecovered: Int
init(Country: String,
CountryCode: String,
NewConfirmed: Int,
TotalConfirmed: Int,
NewDeaths: Int,
TotalDeaths: Int,
NewRecovered: Int,
TotalRecovered: Int) {
self.Country = Country
self.CountryCode = CountryCode
self.NewConfirmed = NewConfirmed
self.TotalConfirmed = TotalConfirmed
self.NewDeaths = NewDeaths
self.TotalDeaths = TotalDeaths
self.NewRecovered = NewRecovered
self.TotalRecovered = TotalRecovered
}
}