This commit is contained in:
Trey t
2023-08-09 10:13:13 -05:00
parent 173f39cc5f
commit 4824fbc0fe
16 changed files with 206 additions and 93 deletions

View File

@@ -8,7 +8,7 @@
import Foundation
struct SupersetExercise: Identifiable, Codable, Equatable, Hashable {
var id: Int
var id: Int?
let workout: Int?
let exercise: Exercise
@@ -17,9 +17,9 @@ struct SupersetExercise: Identifiable, Codable, Equatable, Hashable {
let duration: Int?
let durationAudio: String?
let weightAudio: String?
let createdAt: String
let order, superset: Int
let uniqueID: String
let createdAt: String?
let order, superset: Int?
let uniqueID: String?
let description: String?
enum CodingKeys: String, CodingKey {

View File

@@ -13,6 +13,7 @@ struct RegisteredUser: Codable, Hashable {
let nickName: String?
let token: String?
let email: String?
let hasNSFWToggle: Bool?
enum CodingKeys: String, CodingKey {
case id
@@ -21,5 +22,10 @@ struct RegisteredUser: Codable, Hashable {
case image, token
case email = "email_address"
case nickName = "nick_name"
case hasNSFWToggle = "has_nsfw_toggle"
}
var NSFWValue: Bool {
return hasNSFWToggle ?? false
}
}

View File

@@ -8,7 +8,7 @@
import Foundation
struct Superset: Codable, Identifiable, Hashable {
let id: Int
let id: Int?
let exercises: [SupersetExercise]
let createdAt, updatedAt, name: String?
let rounds, order, workout: Int