import SwiftData
import Foundation

@Model
public final class VerbForm {
    public var verbId: Int = 0
    public var tenseId: String = ""
    public var personIndex: Int = 0
    public var form: String = ""
    public var regularity: String = ""

    public var verb: Verb?

    @Relationship(deleteRule: .cascade, inverse: \IrregularSpan.verbForm)
    public var spans: [IrregularSpan]?

    public init(verbId: Int, tenseId: String, personIndex: Int, form: String, regularity: String) {
        self.verbId = verbId
        self.tenseId = tenseId
        self.personIndex = personIndex
        self.form = form
        self.regularity = regularity
    }
}
