31 lines
511 B
Swift
31 lines
511 B
Swift
//
|
|
// Item.swift
|
|
// WorkoutsPlus
|
|
//
|
|
// Created by Felix Förtsch on 10.08.24.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftData
|
|
|
|
@Model
|
|
final class Exercise {
|
|
var name: String
|
|
static var systemImage = "figure.run"
|
|
|
|
var timestamp: Date
|
|
|
|
init(_ name: String = "", timestamp: Date = Date.now) {
|
|
self.name = name
|
|
self.timestamp = timestamp
|
|
}
|
|
|
|
static let sampleData = [
|
|
Exercise("Pull-up"),
|
|
Exercise("Push-up"),
|
|
Exercise("Dips"),
|
|
Exercise("Rows"),
|
|
Exercise("Split Squat")
|
|
]
|
|
}
|