change folders to the "feature" mindset

This commit is contained in:
Felix Förtsch
2024-10-21 15:03:47 +02:00
parent 97ecbcc6f4
commit d1a87957f6
34 changed files with 121 additions and 139 deletions
@@ -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
}
}