From what I can see in the ”Meet SwiftData” and the code along video ”Build an app with SwiftData” WWDC2023 videos you should include ”import SwiftData” and ”@Model” in every file you want to use SwiftData and the associated macros like @Model in every swift file.