-
Notifications
You must be signed in to change notification settings - Fork 0
/
StudentInformation.swift
48 lines (45 loc) · 1.16 KB
/
StudentInformation.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
41
42
43
44
45
46
47
48
//
// Student.swift
// OnTheMap
//
// Created by Darren Leith on 16/02/2016.
// Copyright © 2016 Darren Leith. All rights reserved.
//
struct StudentInformation {
var objectId:String?
var uniqueKey: String?
var firstName: String?
var lastName: String?
var mapString: String?
var mediaURL: String?
var latitude: Float?
var longitude: Float?
init(dictionary: [String: AnyObject]?) {
if let dictionary = dictionary {
if let objectId = dictionary["objectId"] as? String {
self.objectId = objectId
}
if let uniqueKey = dictionary["uniqueKey"] as? String {
self.uniqueKey = uniqueKey
}
if let firstName = dictionary["firstName"] as? String{
self.firstName = firstName
}
if let lastName = dictionary["lastName"] as? String{
self.lastName = lastName
}
if let mapString = dictionary["mapString"] as? String {
self.mapString = mapString
}
if let mediaURL = dictionary["mediaURL"] as? String {
self.mediaURL = mediaURL
}
if let latitude = dictionary["latitude"] as? Float {
self.latitude = latitude
}
if let longitude = dictionary["longitude"] as? Float{
self.longitude = longitude
}
}
}
}