//
//  AllWorkoutFetchable.swift
//  Werkout_ios
//
//  Created by Trey Tartt on 6/19/23.
//

import Foundation

class AllWorkoutFetchable: Fetchable {
    typealias Response = [Workout]
    var endPoint: String = "workout/all/"
}

class WorkoutDetailFetchable: Fetchable {
    typealias Response = Workout
    var endPoint: String
        
    init(workoutID: Int) {
        self.endPoint = "workout/"+String(workoutID)+"/details/"
    }
}

class AllMusclesFetchable: Fetchable {
    typealias Response = [Muscle]
    var endPoint: String = "muscle/all/"
}

class AllEquipmentFetchable: Fetchable {
    typealias Response = [Equipment]
    var endPoint: String = "equipment/all/"
}

class AllExerciseFetchable: Fetchable {
    typealias Response = [ExerciseExercise]
    var endPoint: String = "exercise/all/"
}

class CreateWorkoutFetchable: Postable {
    var postableData: [String : Any]?
    
    typealias Response = Workout
    var endPoint: String = "workout/create/"
    
    init(postData: [String: Any]) {
        self.postableData = postData
    }
}
