services are checked
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from databases.sql_models.core_mixin import CrudCollection
|
||||
|
||||
from sqlalchemy.orm import mapped_column
|
||||
from sqlalchemy.orm import mapped_column, Mapped
|
||||
from sqlalchemy import (
|
||||
String,
|
||||
Integer,
|
||||
@@ -10,6 +10,8 @@ from sqlalchemy import (
|
||||
Boolean,
|
||||
TIMESTAMP,
|
||||
Numeric,
|
||||
Identity,
|
||||
UUID,
|
||||
)
|
||||
|
||||
|
||||
@@ -18,15 +20,15 @@ class AccountBooks(CrudCollection):
|
||||
__tablename__ = "account_books"
|
||||
__exclude__fields__ = []
|
||||
|
||||
country = mapped_column(String, nullable=False)
|
||||
branch_type = mapped_column(SmallInteger, server_default="0")
|
||||
# start_date = mapped_column(TIMESTAMP, nullable=False, comment="Account Start Date")
|
||||
# stop_date = mapped_column(TIMESTAMP, server_default="2900-01-01 00:00:00")
|
||||
country: Mapped[str] = mapped_column(String, nullable=False)
|
||||
branch_type: Mapped[str] = mapped_column(SmallInteger, server_default="0")
|
||||
|
||||
company_id = mapped_column(ForeignKey("companies.id"), nullable=False)
|
||||
company_uu_id = mapped_column(String, nullable=False)
|
||||
branch_id = mapped_column(ForeignKey("companies.id"))
|
||||
branch_uu_id = mapped_column(String, comment="Branch UU ID")
|
||||
company_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("companies.id"), nullable=False
|
||||
)
|
||||
company_uu_id: Mapped[UUID] = mapped_column(String, nullable=False)
|
||||
branch_id: Mapped[Identity] = mapped_column(ForeignKey("companies.id"))
|
||||
branch_uu_id: Mapped[UUID] = mapped_column(String, comment="Branch UU ID")
|
||||
|
||||
# company: Mapped["Companies"] = relationship(
|
||||
# "Company", back_populates="company_account_books", foreign_keys=[company_id]
|
||||
@@ -58,24 +60,34 @@ class AccountCodes(CrudCollection):
|
||||
__tablename__ = "account_codes"
|
||||
__exclude__fields__ = []
|
||||
|
||||
account_code = mapped_column(String(48), nullable=False, comment="Account Code")
|
||||
comment_line = mapped_column(String(128), nullable=False, comment="Comment Line")
|
||||
account_code: Mapped[str] = mapped_column(
|
||||
String(48), nullable=False, comment="Account Code"
|
||||
)
|
||||
comment_line: Mapped[str] = mapped_column(
|
||||
String(128), nullable=False, comment="Comment Line"
|
||||
)
|
||||
|
||||
is_receive_or_debit = mapped_column(Boolean)
|
||||
product_id = mapped_column(Integer, server_default="0")
|
||||
nvi_id = mapped_column(String(48), server_default="")
|
||||
status_id = mapped_column(SmallInteger, server_default="0")
|
||||
account_code_seperator = mapped_column(String(1), server_default=".")
|
||||
is_receive_or_debit: Mapped[bool] = mapped_column(Boolean)
|
||||
product_id: Mapped[Identity] = mapped_column(Integer, server_default="0")
|
||||
nvi_id: Mapped[str] = mapped_column(String(48), server_default="")
|
||||
status_id: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
account_code_seperator: Mapped[str] = mapped_column(String(1), server_default=".")
|
||||
|
||||
system_id = mapped_column(SmallInteger, server_default="0")
|
||||
locked = mapped_column(SmallInteger, server_default="0")
|
||||
system_id: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
locked: Mapped[bool] = mapped_column(SmallInteger, server_default="0")
|
||||
|
||||
company_id = mapped_column(ForeignKey("companies.id"))
|
||||
company_uu_id = mapped_column(String, nullable=False, comment="Company UU ID")
|
||||
customer_id = mapped_column(ForeignKey("companies.id"))
|
||||
customer_uu_id = mapped_column(String, nullable=False, comment="Customer UU ID")
|
||||
person_id = mapped_column(ForeignKey("people.id"))
|
||||
person_uu_id = mapped_column(String, nullable=False, comment="Person UU ID")
|
||||
company_id: Mapped[Identity] = mapped_column(ForeignKey("companies.id"))
|
||||
company_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, nullable=False, comment="Company UU ID"
|
||||
)
|
||||
customer_id: Mapped[Identity] = mapped_column(ForeignKey("companies.id"))
|
||||
customer_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, nullable=False, comment="Customer UU ID"
|
||||
)
|
||||
person_id: Mapped[Identity] = mapped_column(ForeignKey("people.id"))
|
||||
person_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, nullable=False, comment="Person UU ID"
|
||||
)
|
||||
|
||||
# company: Mapped["Companies"] = relationship(
|
||||
# "Company", back_populates="account_codes", foreign_keys=[company_id]
|
||||
@@ -104,15 +116,17 @@ class AccountCodeParser(CrudCollection):
|
||||
__tablename__ = "account_code_parser"
|
||||
__exclude__fields__ = []
|
||||
|
||||
account_code_1 = mapped_column(String, nullable=False, comment="Order")
|
||||
account_code_2 = mapped_column(String, nullable=False, comment="Order")
|
||||
account_code_3 = mapped_column(String, nullable=False, comment="Order")
|
||||
account_code_4 = mapped_column(String, server_default="")
|
||||
account_code_5 = mapped_column(String, server_default="")
|
||||
account_code_6 = mapped_column(String, server_default="")
|
||||
account_code_1: Mapped[str] = mapped_column(String, nullable=False, comment="Order")
|
||||
account_code_2: Mapped[str] = mapped_column(String, nullable=False, comment="Order")
|
||||
account_code_3: Mapped[str] = mapped_column(String, nullable=False, comment="Order")
|
||||
account_code_4: Mapped[str] = mapped_column(String, server_default="")
|
||||
account_code_5: Mapped[str] = mapped_column(String, server_default="")
|
||||
account_code_6: Mapped[str] = mapped_column(String, server_default="")
|
||||
|
||||
account_code_id = mapped_column(ForeignKey("account_codes.id"), nullable=False)
|
||||
account_code_uu_id = mapped_column(
|
||||
account_code_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("account_codes.id"), nullable=False
|
||||
)
|
||||
account_code_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, nullable=False, comment="Account Code UU ID"
|
||||
)
|
||||
|
||||
@@ -146,51 +160,61 @@ class AccountMaster(CrudCollection):
|
||||
__tablename__ = "account_master"
|
||||
__exclude__fields__ = []
|
||||
|
||||
doc_date = mapped_column(TIMESTAMP, nullable=False, comment="Document Date")
|
||||
plug_type = mapped_column(String, nullable=False, comment="Plug Type")
|
||||
plug_number = mapped_column(Integer, nullable=False, comment="Plug Number")
|
||||
doc_date: Mapped[TIMESTAMP] = mapped_column(
|
||||
TIMESTAMP, nullable=False, comment="Document Date"
|
||||
)
|
||||
plug_type: Mapped[str] = mapped_column(String, nullable=False, comment="Plug Type")
|
||||
plug_number: Mapped[int] = mapped_column(
|
||||
Integer, nullable=False, comment="Plug Number"
|
||||
)
|
||||
|
||||
special_code = mapped_column(String(12), server_default="")
|
||||
authorization_code = mapped_column(String(12), server_default="")
|
||||
special_code: Mapped[str] = mapped_column(String(12), server_default="")
|
||||
authorization_code: Mapped[str] = mapped_column(String(12), server_default="")
|
||||
|
||||
doc_code = mapped_column(String(12), server_default="")
|
||||
doc_type = mapped_column(SmallInteger, server_default="0")
|
||||
doc_code: Mapped[str] = mapped_column(String(12), server_default="")
|
||||
doc_type: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
|
||||
comment_line1 = mapped_column(String, server_default="")
|
||||
comment_line2 = mapped_column(String, server_default="")
|
||||
comment_line3 = mapped_column(String, server_default="")
|
||||
comment_line4 = mapped_column(String, server_default="")
|
||||
comment_line5 = mapped_column(String, server_default="")
|
||||
comment_line6 = mapped_column(String, server_default="")
|
||||
project_code = mapped_column(String(12), server_default="")
|
||||
module_no = mapped_column(String, server_default="")
|
||||
journal_no = mapped_column(Integer, server_default="0")
|
||||
comment_line1: Mapped[str] = mapped_column(String, server_default="")
|
||||
comment_line2: Mapped[str] = mapped_column(String, server_default="")
|
||||
comment_line3: Mapped[str] = mapped_column(String, server_default="")
|
||||
comment_line4: Mapped[str] = mapped_column(String, server_default="")
|
||||
comment_line5: Mapped[str] = mapped_column(String, server_default="")
|
||||
comment_line6: Mapped[str] = mapped_column(String, server_default="")
|
||||
project_code: Mapped[str] = mapped_column(String(12), server_default="")
|
||||
module_no: Mapped[str] = mapped_column(String, server_default="")
|
||||
journal_no: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
|
||||
status_id = mapped_column(SmallInteger, server_default="0")
|
||||
canceled = mapped_column(Boolean, server_default="0")
|
||||
print_count = mapped_column(SmallInteger, server_default="0")
|
||||
total_active = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_active_1 = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive_1 = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_active_2 = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive_2 = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_active_3 = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive_3 = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_active_4 = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive_4 = mapped_column(Numeric(20, 6), server_default="0")
|
||||
cross_ref = mapped_column(Integer, server_default="0")
|
||||
data_center_id = mapped_column(String, server_default="")
|
||||
data_center_rec_num = mapped_column(Integer, server_default="0")
|
||||
status_id: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
canceled: Mapped[bool] = mapped_column(Boolean, server_default="0")
|
||||
print_count: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
total_active: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_active_1: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive_1: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_active_2: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive_2: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_active_3: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive_3: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_active_4: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
total_passive_4: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
cross_ref: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
data_center_id: Mapped[str] = mapped_column(String, server_default="")
|
||||
data_center_rec_num: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
|
||||
account_header_id = mapped_column(ForeignKey("account_books.id"), nullable=False)
|
||||
account_header_uu_id = mapped_column(
|
||||
account_header_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("account_books.id"), nullable=False
|
||||
)
|
||||
account_header_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, nullable=False, comment="Account Header UU ID"
|
||||
)
|
||||
project_item_id = mapped_column(ForeignKey("build_decision_book_projects.id"))
|
||||
project_item_uu_id = mapped_column(String, comment="Project Item UU ID")
|
||||
department_id = mapped_column(ForeignKey("departments.id"))
|
||||
department_uu_id = mapped_column(String, comment="Department UU ID")
|
||||
project_item_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("build_decision_book_projects.id")
|
||||
)
|
||||
project_item_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, comment="Project Item UU ID"
|
||||
)
|
||||
department_id: Mapped[Identity] = mapped_column(ForeignKey("departments.id"))
|
||||
department_uu_id: Mapped[UUID] = mapped_column(String, comment="Department UU ID")
|
||||
|
||||
# account_header: Mapped["AccountBooks"] = relationship(
|
||||
# "AccountBooks",
|
||||
@@ -223,59 +247,77 @@ class AccountDetail(CrudCollection):
|
||||
__exclude__fields__ = []
|
||||
__enum_list__ = [("plug_type", "AccountingReceiptTypes", "M")]
|
||||
|
||||
doc_date = mapped_column(TIMESTAMP, nullable=False, comment="Document Date")
|
||||
line_no = mapped_column(SmallInteger, nullable=False, comment="Line Number")
|
||||
receive_debit = mapped_column(String(1), nullable=False, comment="Receive Debit")
|
||||
debit = mapped_column(Numeric(20, 6), nullable=False, comment="Debit")
|
||||
doc_date: Mapped[TIMESTAMP] = mapped_column(
|
||||
TIMESTAMP, nullable=False, comment="Document Date"
|
||||
)
|
||||
line_no: Mapped[int] = mapped_column(
|
||||
SmallInteger, nullable=False, comment="Line Number"
|
||||
)
|
||||
receive_debit: Mapped[str] = mapped_column(
|
||||
String(1), nullable=False, comment="Receive Debit"
|
||||
)
|
||||
debit: Mapped[float] = mapped_column(
|
||||
Numeric(20, 6), nullable=False, comment="Debit"
|
||||
)
|
||||
|
||||
department = mapped_column(String(24), server_default="")
|
||||
special_code = mapped_column(String(12), server_default="")
|
||||
account_ref = mapped_column(Integer, server_default="0")
|
||||
account_fiche_ref = mapped_column(Integer, server_default="0")
|
||||
center_ref = mapped_column(Integer, server_default="0")
|
||||
general_code = mapped_column(String(32), server_default="")
|
||||
credit = mapped_column(Numeric(20, 6), server_default="0")
|
||||
currency_type = mapped_column(String(4), server_default="TL")
|
||||
exchange_rate = mapped_column(Numeric(20, 6), server_default="0")
|
||||
debit_cur = mapped_column(Numeric(20, 6), server_default="0")
|
||||
credit_cur = mapped_column(Numeric(20, 6), server_default="0")
|
||||
discount_cur = mapped_column(Numeric(20, 6), server_default="0")
|
||||
amount = mapped_column(Numeric(20, 6), server_default="0")
|
||||
cross_account_code = mapped_column(String(32), server_default="")
|
||||
inf_index = mapped_column(Numeric(20, 6), server_default="0")
|
||||
not_inflated = mapped_column(SmallInteger, server_default="0")
|
||||
not_calculated = mapped_column(SmallInteger, server_default="0")
|
||||
comment_line1 = mapped_column(String(64), server_default="")
|
||||
comment_line2 = mapped_column(String(64), server_default="")
|
||||
comment_line3 = mapped_column(String(64), server_default="")
|
||||
comment_line4 = mapped_column(String(64), server_default="")
|
||||
comment_line5 = mapped_column(String(64), server_default="")
|
||||
comment_line6 = mapped_column(String(64), server_default="")
|
||||
owner_acc_ref = mapped_column(Integer, server_default="0")
|
||||
from_where = mapped_column(Integer, server_default="0")
|
||||
orj_eid = mapped_column(Integer, server_default="0")
|
||||
canceled = mapped_column(SmallInteger, server_default="0")
|
||||
cross_ref = mapped_column(Integer, server_default="0")
|
||||
data_center_id = mapped_column(String, server_default="")
|
||||
data_center_rec_num = mapped_column(Integer, server_default="0")
|
||||
status_id = mapped_column(SmallInteger, server_default="0")
|
||||
department: Mapped[str] = mapped_column(String(24), server_default="")
|
||||
special_code: Mapped[str] = mapped_column(String(12), server_default="")
|
||||
account_ref: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
account_fiche_ref: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
center_ref: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
general_code: Mapped[str] = mapped_column(String(32), server_default="")
|
||||
credit: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
currency_type: Mapped[str] = mapped_column(String(4), server_default="TL")
|
||||
exchange_rate: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
debit_cur: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
credit_cur: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
discount_cur: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
amount: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
cross_account_code: Mapped[float] = mapped_column(String(32), server_default="")
|
||||
inf_index: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
not_inflated: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
not_calculated: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
comment_line1: Mapped[str] = mapped_column(String(64), server_default="")
|
||||
comment_line2: Mapped[str] = mapped_column(String(64), server_default="")
|
||||
comment_line3: Mapped[str] = mapped_column(String(64), server_default="")
|
||||
comment_line4: Mapped[str] = mapped_column(String(64), server_default="")
|
||||
comment_line5: Mapped[str] = mapped_column(String(64), server_default="")
|
||||
comment_line6: Mapped[str] = mapped_column(String(64), server_default="")
|
||||
owner_acc_ref: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
from_where: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
orj_eid: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
canceled: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
cross_ref: Mapped[int] = mapped_column(Integer, server_default="0")
|
||||
data_center_id: Mapped[str] = mapped_column(String, server_default="")
|
||||
data_center_rec_num: Mapped[str] = mapped_column(Integer, server_default="0")
|
||||
status_id: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
|
||||
plug_type_id = mapped_column(ForeignKey("api_enum_dropdown.id"), nullable=True)
|
||||
plug_type_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("api_enum_dropdown.id"), nullable=True
|
||||
)
|
||||
plug_type_uu_id = mapped_column(String, nullable=False, comment="Plug Type UU ID")
|
||||
account_header_id = mapped_column(ForeignKey("account_books.id"), nullable=False)
|
||||
account_header_uu_id = mapped_column(
|
||||
account_header_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("account_books.id"), nullable=False
|
||||
)
|
||||
account_header_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, nullable=False, comment="Account Header UU ID"
|
||||
)
|
||||
account_code_id = mapped_column(ForeignKey("account_codes.id"), nullable=False)
|
||||
account_code_uu_id = mapped_column(
|
||||
account_code_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("account_codes.id"), nullable=False
|
||||
)
|
||||
account_code_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, nullable=False, comment="Account Code UU ID"
|
||||
)
|
||||
account_master_id = mapped_column(ForeignKey("account_master.id"), nullable=False)
|
||||
account_master_uu_id = mapped_column(
|
||||
account_master_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("account_master.id"), nullable=False
|
||||
)
|
||||
account_master_uu_id: Mapped[UUID] = mapped_column(
|
||||
String, nullable=False, comment="Account Master UU ID"
|
||||
)
|
||||
project_id = mapped_column(ForeignKey("build_decision_book_projects.id"))
|
||||
project_uu_id = mapped_column(String, comment="Project UU ID")
|
||||
project_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("build_decision_book_projects.id")
|
||||
)
|
||||
project_uu_id: Mapped[UUID] = mapped_column(String, comment="Project UU ID")
|
||||
|
||||
# account_header: Mapped["AccountBooks"] = relationship(
|
||||
# "AccountBooks",
|
||||
@@ -342,87 +384,102 @@ class AccountRecords(CrudCollection):
|
||||
build_decision_book_id = kaydın sorumlu olduğu karar defteri
|
||||
send_company_id = kaydı gönderen firma, send_person_id = gönderen kişi
|
||||
customer_id = sorumlu kullanıcı bilgisi, company_id = sorumlu firma
|
||||
|
||||
"""
|
||||
|
||||
iban = mapped_column(String(64), nullable=False, comment="IBAN Number of Bank")
|
||||
bank_date = mapped_column(
|
||||
iban: Mapped[str] = mapped_column(
|
||||
String(64), nullable=False, comment="IBAN Number of Bank"
|
||||
)
|
||||
bank_date: Mapped[TIMESTAMP] = mapped_column(
|
||||
TIMESTAMP, nullable=False, comment="Bank Transaction Date"
|
||||
)
|
||||
|
||||
currency_value = mapped_column(
|
||||
currency_value: Mapped[float] = mapped_column(
|
||||
Numeric(20, 6), nullable=False, comment="Currency Value"
|
||||
)
|
||||
bank_balance = mapped_column(Numeric(20, 6), nullable=False, comment="Bank Balance")
|
||||
currency = mapped_column(String(5), nullable=False, comment="Unit of Currency")
|
||||
additional_balance = mapped_column(
|
||||
bank_balance: Mapped[float] = mapped_column(
|
||||
Numeric(20, 6), nullable=False, comment="Bank Balance"
|
||||
)
|
||||
currency: Mapped[str] = mapped_column(
|
||||
String(5), nullable=False, comment="Unit of Currency"
|
||||
)
|
||||
additional_balance: Mapped[float] = mapped_column(
|
||||
Numeric(20, 6), nullable=False, comment="Additional Balance"
|
||||
)
|
||||
channel_branch = mapped_column(String(120), nullable=False, comment="Branch Bank")
|
||||
process_name = mapped_column(
|
||||
channel_branch: Mapped[str] = mapped_column(
|
||||
String(120), nullable=False, comment="Branch Bank"
|
||||
)
|
||||
process_name: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Bank Process Type Name"
|
||||
)
|
||||
process_type = mapped_column(
|
||||
process_type: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Bank Process Type"
|
||||
)
|
||||
process_comment = mapped_column(
|
||||
process_comment: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Transaction Record Comment"
|
||||
)
|
||||
bank_reference_code = mapped_column(
|
||||
bank_reference_code: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Bank Reference Code"
|
||||
)
|
||||
|
||||
add_comment_note = mapped_column(String, server_default="")
|
||||
is_receipt_mail_send = mapped_column(Boolean, server_default="0")
|
||||
add_comment_note: Mapped[str] = mapped_column(String, server_default="")
|
||||
is_receipt_mail_send: Mapped[bool] = mapped_column(Boolean, server_default="0")
|
||||
found_from = mapped_column(String, server_default="")
|
||||
similarity = mapped_column(Numeric(20, 6), server_default="0")
|
||||
remainder_balance = mapped_column(Numeric(20, 6), server_default="0")
|
||||
similarity: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
remainder_balance: Mapped[float] = mapped_column(Numeric(20, 6), server_default="0")
|
||||
|
||||
bank_date_y = mapped_column(Integer)
|
||||
bank_date_m = mapped_column(SmallInteger)
|
||||
bank_date_w = mapped_column(SmallInteger)
|
||||
bank_date_d = mapped_column(SmallInteger)
|
||||
bank_date_y: Mapped[int] = mapped_column(Integer)
|
||||
bank_date_m: Mapped[int] = mapped_column(SmallInteger)
|
||||
bank_date_w: Mapped[int] = mapped_column(SmallInteger)
|
||||
bank_date_d: Mapped[int] = mapped_column(SmallInteger)
|
||||
|
||||
approving_accounting_record = mapped_column(Boolean, server_default="0")
|
||||
approving_accounting_record: Mapped[bool] = mapped_column(
|
||||
Boolean, server_default="0"
|
||||
)
|
||||
accounting_receipt_date = mapped_column(
|
||||
TIMESTAMP, server_default="1900-01-01 00:00:00"
|
||||
)
|
||||
accounting_receipt_number = mapped_column(Integer, server_default="0")
|
||||
status_id = mapped_column(SmallInteger, server_default="0")
|
||||
|
||||
approved_record = mapped_column(Boolean, server_default="0")
|
||||
approved_record: Mapped[bool] = mapped_column(Boolean, server_default="0")
|
||||
import_file_name = mapped_column(String, nullable=True, comment="XLS Key")
|
||||
|
||||
receive_debit = mapped_column(ForeignKey("api_enum_dropdown.id"))
|
||||
receive_debit: Mapped[Identity] = mapped_column(ForeignKey("api_enum_dropdown.id"))
|
||||
receive_debit_uu_id = mapped_column(String, nullable=True, comment="Debit UU ID")
|
||||
budget_type = mapped_column(ForeignKey("api_enum_dropdown.uu_id"), nullable=True)
|
||||
budget_type: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("api_enum_dropdown.id"), nullable=True
|
||||
)
|
||||
budget_type_uu_id = mapped_column(
|
||||
String, nullable=True, comment="Budget Type UU ID"
|
||||
)
|
||||
|
||||
company_id = mapped_column(ForeignKey("companies.id"))
|
||||
company_id: Mapped[Identity] = mapped_column(ForeignKey("companies.id"))
|
||||
company_uu_id = mapped_column(String, nullable=True, comment="Company UU ID")
|
||||
send_company_id = mapped_column(ForeignKey("companies.id"))
|
||||
send_company_id: Mapped[Identity] = mapped_column(ForeignKey("companies.id"))
|
||||
send_company_uu_id = mapped_column(
|
||||
String, nullable=True, comment="Send Company UU ID"
|
||||
)
|
||||
|
||||
customer_id = mapped_column(ForeignKey("people.id"))
|
||||
customer_id: Mapped[Identity] = mapped_column(ForeignKey("people.id"))
|
||||
customer_uu_id = mapped_column(String, nullable=True, comment="Customer UU ID")
|
||||
send_person_id = mapped_column(ForeignKey("people.id"))
|
||||
send_person_id: Mapped[Identity] = mapped_column(ForeignKey("people.id"))
|
||||
send_person_uu_id = mapped_column(
|
||||
String, nullable=True, comment="Send Person UU ID"
|
||||
)
|
||||
approving_accounting_person = mapped_column(ForeignKey("people.id"))
|
||||
approving_accounting_person: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("people.id")
|
||||
)
|
||||
approving_accounting_person_uu_id = mapped_column(
|
||||
String, nullable=True, comment="Approving Accounting Person UU ID"
|
||||
)
|
||||
# build_id = mapped_column(ForeignKey("build.id"), nullable=True)
|
||||
build_parts_id = mapped_column(ForeignKey("build_parts.id"))
|
||||
# build_id: Mapped[Identity] = mapped_column(ForeignKey("build.id"), nullable=True)
|
||||
build_parts_id: Mapped[Identity] = mapped_column(ForeignKey("build_parts.id"))
|
||||
build_parts_uu_id = mapped_column(
|
||||
String, nullable=True, comment="Build Parts UU ID"
|
||||
)
|
||||
build_decision_book_id = mapped_column(ForeignKey("build_decision_book.id"))
|
||||
build_decision_book_id: Mapped[Identity] = mapped_column(
|
||||
ForeignKey("build_decision_book.id")
|
||||
)
|
||||
build_decision_book_uu_id = mapped_column(
|
||||
String, nullable=True, comment="Build Decision Book UU ID"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user