import Foundation
import SwiftData

@Model
final class Dish {
    @Attribute(.unique) var id: UUID
    var name: String
    var descriptionText: String?
    var tagIds: [UUID]
    var createdAt: Date

    init(
        id: UUID = UUID(),
        name: String,
        descriptionText: String? = nil,
        tagIds: [UUID] = [],
        createdAt: Date = Date()
    ) {
        self.id = id
        self.name = name
        self.descriptionText = descriptionText
        self.tagIds = tagIds
        self.createdAt = createdAt
    }
}
