//
//  Superset.swift
//  Werkout_ios
//
//  Created by Trey Tartt on 7/17/23.
//

import Foundation

struct Superset: Codable, Identifiable, Hashable {
    let id: Int?
    let exercises: [SupersetExercise]
    let createdAt, updatedAt, name: String?
    let rounds, order, workout: Int
    let estimatedTime: Double?
    
    enum CodingKeys: String, CodingKey {
        case id, exercises
        case createdAt = "created_at"
        case updatedAt = "updated_at"
        case name, rounds, order, workout
        case estimatedTime = "estimated_time"
    }
    
    public func hash(into hasher: inout Hasher) {
        return hasher.combine(id)
    }
}
