This is my data model inside a structure. There is an array with 15 up to 30 elements, depending on the situation. It is an array of tuples and that has its disadvantages. What is the cleanest way to rewrite my datamodel? And what are advantages and disadvantages?
import SwiftUI
import Combine
import Foundation
struct Egg: Identifiable {
typealias EggDay = (day: Int, mW: Double, measured: Bool, daily: Double)
let id: Int
let taxonomy: String
let species: String
let layDate: Date
let daysToPip: Int
let daysToHatch: Int
let weightLossMin : Int
let weightLossMax: Int
let temperature: Double
let humidity: Double
let actualWeights : [EggDay]
}
In my app I work with an array of Eggs, mainly to have a List with eggs to be able to select one. And then the selected egg displays all days to edit/add measurements.