Skip to content

Glossary: SwiftUI

@Model

Also written: model (SwiftData)

A macro that turns a Swift class, such as SavedOrder, into something SwiftData can store, with each stored property becoming a database column. It must be a class, not a struct.

Where the book teaches it

Related terms

SwiftDataModelContainerModelContext@Querymacro