forked from asuc-octo/berkeley-mobile-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCampusResource.swift
58 lines (46 loc) · 1.62 KB
/
CampusResource.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
49
50
51
52
53
54
55
56
57
58
//
// CampusResource.swift
// berkeleyMobileiOS
//
// Created by Maya Reddy on 11/25/16.
// Copyright © 2016 org.berkeleyMobile. All rights reserved.
//
import UIKit
class CampusResource: Resource {
var image: UIImage?
static func displayName(pluralized: Bool) -> String {
return "Campus Resource" + (pluralized ? "s" : "")
}
static var dataSource: ResourceDataSource.Type? = CampusResourceDataSource.self
static var detailProvider: ResourceDetailProvider.Type? = nil
let name: String
let imageURL: URL?
var isFavorited: Bool = false
let campusLocation: String?
let phoneNumber: String?
let alternatePhoneNumber: String?
let email: String?
let hours: String?
let latitude: Double?
let longitude: Double?
let notes: String?
let description: String?
let category: String?
var isOpen: Bool {
return false
}
init(name: String, campusLocation: String?, phoneNumber: String?, alternatePhoneNumber: String?, email: String?, hours: String?, latitude: Double?, longitude: Double?, notes: String?, imageLink: String?, description: String?, category: String?) {
self.campusLocation = campusLocation
self.phoneNumber = phoneNumber
self.alternatePhoneNumber = alternatePhoneNumber
self.email = email
self.hours = hours
self.latitude = latitude
self.longitude = longitude
self.notes = notes
self.name = name
self.imageURL = URL(string: imageLink ?? "")
self.description = description
self.category = category
}
}