//
//  CompletedWorkout.swift
//  Werkout_ios
//
//  Created by Trey Tartt on 6/21/23.
//

import Foundation

struct CompletedWorkout: Codable {
    let id: Int
    let workout: Workout
    let createdAt, updatedAt: String
    let difficulty, totalTime: Int?
    let workoutStartTime: String
    let notes: String?
    let totalCalories: Float?
    
    enum CodingKeys: String, CodingKey {
        case id, workout
        case createdAt = "created_at"
        case updatedAt = "updated_at"
        case difficulty
        case totalTime = "total_time"
        case workoutStartTime = "workout_start_time"
        case notes
        case totalCalories = "total_calories"
    }
}

struct CompletedWorkoutPOSTReturn: Codable {
    let id: Int
    let workout: Int
    let createdAt, updatedAt: String
    let difficulty, totalTime: Int?
    let workoutStartTime: String
    let notes: String?
    let totalCalories: Int?
    
    enum CodingKeys: String, CodingKey {
        case id, workout
        case createdAt = "created_at"
        case updatedAt = "updated_at"
        case difficulty
        case totalTime = "total_time"
        case workoutStartTime = "workout_start_time"
        case notes
        case totalCalories = "total_calories"
    }
}
