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 Reserve(Base):
    __tablename__ = "reserve"
    __table_args__ = {"schema": "v3"}

    line_id: Mapped[int] = mapped_column(Integer, ForeignKey("v3.budget_line.id"), primary_key=True)
    amount_q1: Mapped[float | None] = mapped_column(Numeric)
    amount_q2: Mapped[float | None] = mapped_column(Numeric)
    amount_q3: Mapped[float | None] = mapped_column(Numeric)
    amount_q4: Mapped[float | None] = mapped_column(Numeric)
    justification: Mapped[str | None] = mapped_column(String)

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