WIP
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
struct SupersetExercise: Identifiable, Codable, Equatable, Hashable {
|
||||
var id = UUID()
|
||||
var id: Int
|
||||
|
||||
let workout: Int?
|
||||
let exercise: Exercise
|
||||
@@ -19,12 +19,15 @@ struct SupersetExercise: Identifiable, Codable, Equatable, Hashable {
|
||||
let weightAudio: String?
|
||||
let createdAt: String
|
||||
let order, superset: Int
|
||||
let uniqueID: String
|
||||
let description: String?
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case workout, exercise, weight, reps, duration, order, superset
|
||||
case workout, exercise, weight, reps, duration, order, superset, id, description
|
||||
case durationAudio = "duration_audio"
|
||||
case weightAudio = "weight_audio"
|
||||
case createdAt = "created_at"
|
||||
case uniqueID = "unique_id"
|
||||
}
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
@@ -67,4 +70,13 @@ struct Exercise: Identifiable, Codable, Equatable {
|
||||
case muscleGroups = "muscle_groups"
|
||||
case synonyms
|
||||
}
|
||||
|
||||
var extName: String {
|
||||
if side.count > 0 {
|
||||
var returnString = name + " - " + side
|
||||
returnString = returnString.replacingOccurrences(of: "_", with: " ")
|
||||
return returnString.capitalized
|
||||
}
|
||||
return name
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user