-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataListModel.swift
More file actions
78 lines (54 loc) · 2.38 KB
/
DataListModel.swift
File metadata and controls
78 lines (54 loc) · 2.38 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// DataListModel.swift
// MickleDeals
//
// Created by Chan, Nicky on 8/3/15.
// Copyright © 2015 Chan, Nicky. All rights reserved.
//
import Foundation
class DataListModel {
private(set) var list = [CouponInfo]()
class var instance : DataListModel {
struct Singleton {
static let sharedInstance = DataListModel()
}
return Singleton.sharedInstance
}
init() {
var coupon1 = CouponInfo(id: 1)
coupon1.description = "Free Strawberry Pudding when spent more than $30"
coupon1.descriptionCh = "消費滿$30即獲免費草莓布丁1分"
coupon1.price = 1
coupon1.storeName = "BlueSky Dessert"
coupon1.storeNameCh = "藍天甜品屋"
coupon1.address = "2522 Lawton St, San Francisco";
coupon1.addressShort = "Sunset • San Francisco";
coupon1.imageStr = "pic_1.jpg"
coupon1.imageSmallStr = "pic_1_s.jpg"
coupon1.finePrintText = "Expires Nov 1, 2015. Limit 1 per person. Not valid with any other offers, discounts, or promotional meal deals. Unahtorized internet distribution, replication or resale is strictly prohibited. No cash back or return"
list.append(coupon1)
var coupon2 = CouponInfo(id: 2)
coupon2.description = "10% Off Discount"
coupon2.descriptionCh = "結帳時享有9折優惠"
coupon2.price = 2
coupon2.storeName = "Savory Steak House"
coupon2.address = "2383 Woodrew St, Daly City";
coupon2.addressShort = "Daly City";
coupon2.imageStr = "pic_2.jpg"
coupon2.imageSmallStr = "pic_2_s.jpg"
coupon2.finePrintText = "Expires Nov 1, 2015. Limit 1 per person. Not valid with any other offers, discounts, or promotional meal deals. Unahtorized internet distribution, replication or resale is strictly prohibited. No cash back or return"
list.append(coupon2)
list.append(coupon1)
list.append(coupon2)
list.append(coupon1)
list.append(coupon2)
list.append(coupon1)
list.append(coupon2)
list.append(coupon1)
list.append(coupon2)
list.append(coupon1)
list.append(coupon2)
list.append(coupon1)
list.append(coupon2)
}
}