change folders to the "feature" mindset
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// WorkoutSessionItem.swift
|
||||
// WorkoutsPlus
|
||||
//
|
||||
// Created by Felix Förtsch on 15.10.24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftData
|
||||
|
||||
@Model
|
||||
final class WorkoutSessionItem: Nameable, Positionable {
|
||||
var id = UUID()
|
||||
var position: Int
|
||||
var name: String
|
||||
|
||||
var workoutSession: WorkoutSession
|
||||
|
||||
var plannedReps: Int // 8 times | 1 time
|
||||
var plannedValue: Double // With 10 | 42,187
|
||||
var metric: ExerciseMetric? // kg (weight) | km (distance)
|
||||
|
||||
var actualReps: Int?
|
||||
var actualValue: Double?
|
||||
|
||||
init(workoutSession: WorkoutSession, planned: WorkoutItem) {
|
||||
self.workoutSession = workoutSession
|
||||
self.name = planned.exercise.name
|
||||
self.position = planned.position
|
||||
self.plannedReps = planned.plannedReps
|
||||
self.plannedValue = planned.plannedValue
|
||||
self.metric = planned.metric
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user