services are checked

This commit is contained in:
2024-11-08 17:14:02 +03:00
parent a5b1e0b2f4
commit c5b771e5cb
82 changed files with 1720 additions and 869 deletions

View File

@@ -1,5 +1,5 @@
from sqlalchemy.orm import mapped_column
from sqlalchemy import String, ForeignKey, Index, TIMESTAMP, SmallInteger
from sqlalchemy.orm import mapped_column, Mapped
from sqlalchemy import String, ForeignKey, Index, TIMESTAMP, SmallInteger, Identity
from databases.sql_models.core_mixin import CrudCollection
@@ -12,21 +12,23 @@ class BuildIbans(CrudCollection):
__tablename__ = "build_ibans"
__exclude__fields__ = []
iban = mapped_column(
iban: Mapped[str] = mapped_column(
String(40), server_default="", nullable=False, comment="IBAN number"
)
start_date = mapped_column(
start_date: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP, nullable=False, comment="Bank Transaction Start Date"
)
stop_date = mapped_column(TIMESTAMP, server_default="2900-01-01 00:00:00")
bank_code = mapped_column(String(24), server_default="TR0000000000000")
xcomment = mapped_column(String(64), server_default="????")
stop_date: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP, server_default="2900-01-01 00:00:00"
)
bank_code: Mapped[str] = mapped_column(String(24), server_default="TR0000000000000")
xcomment: Mapped[str] = mapped_column(String(64), server_default="????")
build_id = mapped_column(
build_id: Mapped[Identity] = mapped_column(
ForeignKey("build.id"), nullable=False, comment="Building ID"
)
build_uu_id = mapped_column(
build_uu_id: Mapped[str] = mapped_column(
String, nullable=False, comment="Building UUID", index=True
)
# building: Mapped["Build"] = relationship(
@@ -57,22 +59,30 @@ class BuildIbanDescription(CrudCollection):
__tablename__ = "build_iban_description"
__exclude__fields__ = []
iban = mapped_column(String, nullable=False, comment="IBAN Number")
group_id = mapped_column(SmallInteger, nullable=False, comment="Group ID")
search_word = mapped_column(
iban: Mapped[str] = mapped_column(String, nullable=False, comment="IBAN Number")
group_id: Mapped[int] = mapped_column(
SmallInteger, nullable=False, comment="Group ID"
)
search_word: Mapped[str] = mapped_column(
String, nullable=False, comment="Search Word", index=True
)
decision_book_project_id = mapped_column(ForeignKey("build_decision_book_projects.id"))
decision_book_project_uu_id = mapped_column(
decision_book_project_id: Mapped[Identity] = mapped_column(
ForeignKey("build_decision_book_projects.id")
)
decision_book_project_uu_id: Mapped[str] = mapped_column(
String, nullable=False, comment="Decision Book Project UUID"
)
customer_id = mapped_column(ForeignKey("people.id"))
customer_uu_id = mapped_column(String, nullable=False, comment="Customer UUID")
company_id = mapped_column(ForeignKey("companies.id"))
company_uu_id = mapped_column(String, nullable=False, comment="Company UUID")
build_parts_id = mapped_column(ForeignKey("build_parts.id"))
build_parts_uu_id = mapped_column(
customer_id: Mapped[Identity] = mapped_column(ForeignKey("people.id"))
customer_uu_id: Mapped[str] = mapped_column(
String, nullable=False, comment="Customer UUID"
)
company_id: Mapped[Identity] = mapped_column(ForeignKey("companies.id"))
company_uu_id: Mapped[str] = mapped_column(
String, nullable=False, comment="Company UUID"
)
build_parts_id: Mapped[Identity] = mapped_column(ForeignKey("build_parts.id"))
build_parts_uu_id: Mapped[str] = mapped_column(
String, nullable=False, comment="Build Parts UUID"
)