from __future__ import annotations

from sqlalchemy import CheckConstraint, Date, ForeignKey, Integer, Numeric, String
from sqlalchemy.orm import Mapped, mapped_column, relationship

from src.db.base import Base


class CollegialApproval(Base):
    __tablename__ = "collegial_approval"
    __table_args__ = {"schema": "v3"}

    line_id: Mapped[int] = mapped_column(Integer, ForeignKey("v3.budget_line.id"), primary_key=True)
    approved_amount: Mapped[float | None] = mapped_column(Numeric)
    protocol_reference: Mapped[str | None] = mapped_column(String)
    note: Mapped[str | None] = mapped_column(String)

#     line = relationship("BudgetLine", uselist=False)
