20 lines
722 B
Python
20 lines
722 B
Python
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 Allocation(Base):
|
|
__tablename__ = "allocation"
|
|
__table_args__ = {"schema": "v3"}
|
|
|
|
line_id: Mapped[int] = mapped_column(Integer, ForeignKey("v3.budget_line.id"), primary_key=True)
|
|
internal_order: Mapped[str | None] = mapped_column(String)
|
|
property_object: Mapped[str | None] = mapped_column(String)
|
|
contract_ref: Mapped[str | None] = mapped_column(String)
|
|
allocation_purpose: Mapped[str | None] = mapped_column(String)
|
|
|
|
# line = relationship("BudgetLine", uselist=False)
|