create ER diagram, refactor to conform to diagram, simplify session management
This commit is contained in:
@@ -17,6 +17,8 @@ final class Workout: Nameable, Hashable {
|
||||
|
||||
// The name of my workout is: Recommended Routine, My Marathon Workout
|
||||
@Attribute(.unique) var name: String
|
||||
var defaultRestTime: TimeInterval = 60
|
||||
var useDefaultRestTime: Bool = false
|
||||
|
||||
// Icon
|
||||
var workoutIconSystemName = "figure.run"
|
||||
@@ -33,6 +35,10 @@ final class Workout: Nameable, Hashable {
|
||||
self.name = name
|
||||
}
|
||||
|
||||
func start() -> WorkoutSession {
|
||||
return WorkoutSession(start: self)
|
||||
}
|
||||
|
||||
func add(workoutItem: WorkoutItem) {
|
||||
self.workoutItems.append(workoutItem)
|
||||
updateWorkoutItemsPositions()
|
||||
|
||||
Reference in New Issue
Block a user