WIP
This commit is contained in:
17
Werkout_ios/APIModels/NSFWVideo.swift
Normal file
17
Werkout_ios/APIModels/NSFWVideo.swift
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// NSFWVideo.swift
|
||||
// Werkout_ios
|
||||
//
|
||||
// Created by Trey Tartt on 7/29/23.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct NSFWVideo: Codable {
|
||||
let videoFile, genderValue: String
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case videoFile = "video_file"
|
||||
case genderValue = "gender_value"
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,6 @@ struct Workout: Codable, Identifiable, Equatable {
|
||||
let description: String?
|
||||
let supersets: [Superset]?
|
||||
let registeredUser: RegisteredUser?
|
||||
let femaleVideos, maleVideos, bothVideos: [String]?
|
||||
let muscles: [String]?
|
||||
let equipment: [String]?
|
||||
let exercise_count: Int?
|
||||
@@ -28,9 +27,6 @@ struct Workout: Codable, Identifiable, Equatable {
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case id, name, description, supersets, exercise_count, muscles, equipment
|
||||
case registeredUser = "registered_user"
|
||||
case maleVideos = "male_videos"
|
||||
case femaleVideos = "female_videos"
|
||||
case bothVideos = "both_videos"
|
||||
case createdAt = "created_at"
|
||||
case estimatedTime = "estimated_time"
|
||||
case allSupersetExecercise = "all_superset_exercise"
|
||||
@@ -43,9 +39,6 @@ struct Workout: Codable, Identifiable, Equatable {
|
||||
self.description = try container.decodeIfPresent(String.self, forKey: .description)
|
||||
self.registeredUser = try container.decodeIfPresent(RegisteredUser.self, forKey: .registeredUser)
|
||||
self.id = try container.decode(Int.self, forKey: .id)
|
||||
self.femaleVideos = try container.decodeIfPresent([String].self, forKey: .femaleVideos)
|
||||
self.maleVideos = try container.decodeIfPresent([String].self, forKey: .maleVideos)
|
||||
self.bothVideos = try container.decodeIfPresent([String].self, forKey: .bothVideos)
|
||||
self.supersets = try container.decodeIfPresent([Superset].self, forKey: .supersets)
|
||||
|
||||
self.equipment = try container.decodeIfPresent([String].self, forKey: .equipment)
|
||||
|
||||
Reference in New Issue
Block a user