Actually you can skip the constructor.
@ModelActor
actor CountryModelActor {
func newItem() {
let item = Item(timestamp: .now, name: "\(Int.random(in: 0...3))")
modelContext.insert(item)
try! modelContext.save()
}
}
You will get an error Invalid redeclaration of 'init(modelContainer:)' if you define init(container: ModelContainer). Its being created automatically by macro now.