import SwiftData
import Foundation

@Model
public final class CourseDeck {
    public var id: String = ""
    public var weekNumber: Int = 0
    public var title: String = ""
    public var cardCount: Int = 0
    public var courseName: String = ""
    public var isReversed: Bool = false

    @Relationship(deleteRule: .cascade, inverse: \VocabCard.deck)
    public var cards: [VocabCard]?

    public init(id: String, weekNumber: Int, title: String, cardCount: Int, courseName: String, isReversed: Bool) {
        self.id = id
        self.weekNumber = weekNumber
        self.title = title
        self.cardCount = cardCount
        self.courseName = courseName
        self.isReversed = isReversed
    }
}
