wip
This commit is contained in:
@ -4,10 +4,12 @@ import SwiftData
|
||||
@Model
|
||||
final class Exercise {
|
||||
var name: String = ""
|
||||
var loadType: Int = LoadType.weight.rawValue
|
||||
var order: Int = 0
|
||||
var sets: Int = 0
|
||||
var reps: Int = 0
|
||||
var weight: Int = 0
|
||||
var duration: Date = Date.distantPast
|
||||
var weightLastUpdated: Date = Date()
|
||||
var weightReminderTimeIntervalWeeks: Int = 2
|
||||
|
||||
@ -24,3 +26,18 @@ final class Exercise {
|
||||
self.weightReminderTimeIntervalWeeks = weightReminderTimeIntervalWeeks
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enum LoadType: Int, CaseIterable {
|
||||
case none = 0
|
||||
case weight = 1
|
||||
case duration = 2
|
||||
|
||||
var name: String {
|
||||
switch self {
|
||||
case .none: "None"
|
||||
case .weight: "Weight"
|
||||
case .duration: "Duration"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user