aboutsummaryrefslogtreecommitdiff
path: root/foray/Models
diff options
context:
space:
mode:
authorNicholas Tay <nick@windblume.net>2022-03-25 09:59:35 +1100
committerNicholas Tay <nick@windblume.net>2022-03-25 09:59:35 +1100
commit1752ea7075939fb49dd72e0b8ea2accc2be1b02a (patch)
tree04ad843bc6b05d31cc6524cffe652229e8da0ffd /foray/Models
parent07a6eb8325d3b67d998003d3fe5ab34e1a72f106 (diff)
downloadforayios-1752ea7075939fb49dd72e0b8ea2accc2be1b02a.tar.gz
forayios-1752ea7075939fb49dd72e0b8ea2accc2be1b02a.tar.bz2
forayios-1752ea7075939fb49dd72e0b8ea2accc2be1b02a.zip
Reorganise: NetworkManager -> Fetcher, Models -> dedicated groups
Diffstat (limited to 'foray/Models')
-rw-r--r--foray/Models/PenguinItemModel.swift20
-rw-r--r--foray/Models/PenguinItemViewModel.swift16
2 files changed, 36 insertions, 0 deletions
diff --git a/foray/Models/PenguinItemModel.swift b/foray/Models/PenguinItemModel.swift
new file mode 100644
index 0000000..c721b95
--- /dev/null
+++ b/foray/Models/PenguinItemModel.swift
@@ -0,0 +1,20 @@
+//
+// ForayItems.swift
+// foray
+//
+// Created by Nicholas Tay on 20/3/2022.
+//
+
+import Foundation
+
+enum PenguinItemType: String, Decodable {
+ case item
+ case quest
+}
+
+struct PenguinItemModel: Decodable {
+ let type: PenguinItemType
+ let releaseDate: Date
+ let id: String
+ let name: String
+}
diff --git a/foray/Models/PenguinItemViewModel.swift b/foray/Models/PenguinItemViewModel.swift
new file mode 100644
index 0000000..9b9b058
--- /dev/null
+++ b/foray/Models/PenguinItemViewModel.swift
@@ -0,0 +1,16 @@
+//
+// ForayViewModels.swift
+// foray
+//
+// Created by Nicholas Tay on 24/3/2022.
+//
+
+import Foundation
+
+struct PenguinItemViewModel {
+ let type: PenguinItemType
+ let releaseDateFormatted: String
+ let year: Int
+ let id: String
+ let name: String
+}