initial pre-viable version of watch app

This commit is contained in:
2025-07-20 19:44:53 -04:00
parent 33b88cb8f0
commit 68d90160c6
35 changed files with 2108 additions and 179 deletions

View File

@ -0,0 +1,27 @@
import SwiftUI
import SwiftData
/// A protocol for entities that can be managed in a generic list view.
protocol EditableEntity: PersistentModel, Identifiable, Hashable {
/// The name of the entity to be displayed in the list.
var name: String { get set }
/// A view for adding or editing the entity.
associatedtype FormView: View
@ViewBuilder static func formView(for model: Self) -> FormView
/// Creates a new, empty instance of the entity.
static func createNew() -> Self
/// The title for the navigation bar in the list view.
static var navigationTitle: String { get }
/// An optional property to specify a count to be displayed in the list item.
var count: Int? { get }
}
extension EditableEntity {
var count: Int? {
return nil
}
}