diff options
Diffstat (limited to 'foray/Models')
-rw-r--r-- | foray/Models/PenguinItemModel.swift | 20 | ||||
-rw-r--r-- | foray/Models/PenguinItemViewModel.swift | 16 |
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 +} |