I need 4 file objects to upload. Few files have date, few files have image. What is the data structure should I use?
I tried to create an enum
enum File: String, CaseIterable {
case a = "A"
case b = "B"
case c = "C"
case d = "D"
var size: String//enum cannot contain stored properties
}
I tried to create a struct
struct File {
var name: String//for 4 files
var size: String//only for A and B
var image: UIImage// only for C and D
}