language_models updated

This commit is contained in:
2025-01-09 14:57:30 +03:00
parent 4fe1f36006
commit f4f9e584ff
26 changed files with 2346 additions and 187 deletions

View File

@@ -1,45 +1,389 @@
from databases.sql_models.account.account import AccountBooks
from databases.sql_models.core_mixin import CrudCollection
from databases.language_models.Mixins.crud_mixin import CrudCollectionLanguageModel
AccountBooksLanguageModel = dict(
tr={
str(AccountBooks.created_at.key): "Oluşturulma Tarihi",
str(AccountBooks.updated_at.key): "Güncellenme Tarihi",
**CrudCollectionLanguageModel["tr"],
"country": "Ülke",
"branch_type": "Şube Türü",
"company_id": "Şirket ID",
"company_uu_id": "Şirket UU ID",
"branch_id": "Şube ID",
"branch_uu_id": "Şube UU ID",
},
en={
str(AccountBooks.created_at.key): "Created At",
str(AccountBooks.updated_at.key): "Updated At",
}
**CrudCollectionLanguageModel["en"],
"country": "Country",
"branch_type": "Branch Type",
"company_id": "Company ID",
"company_uu_id": "Company UU ID",
"branch_id": "Branch ID",
"branch_uu_id": "Branch UU ID",
},
)
AccountCodesLanguageModel = dict(
tr={},
en={}
tr={
**CrudCollectionLanguageModel["tr"],
"account_code": "Hesap Kodu",
"comment_line": "Yorum Satırı",
"is_receive_or_debit": "Alacak veya Borç",
"product_id": "Ürün ID",
"nvi_id": "Nvi ID",
"status_id": "Durum ID",
"account_code_seperator": "Hesap Kodu Ayırıcı",
"system_id": "Sistem ID",
"locked": "Kilitli",
"company_id": "Şirket ID",
"company_uu_id": "Şirket UU ID",
"customer_id": "Müşteri ID",
"customer_uu_id": "Müşteri UU ID",
"person_id": "Kişi ID",
"person_uu_id": "Kişi UU ID",
},
en={
**CrudCollectionLanguageModel["en"],
"account_code": "Account Code",
"comment_line": "Comment Line",
"is_receive_or_debit": "Is Receive or Debit",
"product_id": "Product ID",
"nvi_id": "Nvi ID",
"status_id": "Status ID",
"account_code_seperator": "Account Code Seperator",
"system_id": "System ID",
"locked": "Locked",
"company_id": "Company ID",
"company_uu_id": "Company UU ID",
"customer_id": "Customer ID",
"customer_uu_id": "Customer UU ID",
"person_id": "Person ID",
"person_uu_id": "Person UU ID",
},
)
AccountCodeParserLanguageModel = dict(
tr={},
en={}
tr={
**CrudCollectionLanguageModel["tr"],
"account_code_1": "Hesap Kodu 1",
"account_code_2": "Hesap Kodu 2",
"account_code_3": "Hesap Kodu 3",
"account_code_4": "Hesap Kodu 4",
"account_code_5": "Hesap Kodu 5",
"account_code_6": "Hesap Kodu 6",
"account_code_id": "Hesap Kodu ID",
"account_code_uu_id": "Hesap Kodu UU ID",
},
en={
**CrudCollectionLanguageModel["en"],
"account_code_1": "Account Code 1",
"account_code_2": "Account Code 2",
"account_code_3": "Account Code 3",
"account_code_4": "Account Code 4",
"account_code_5": "Account Code 5",
"account_code_6": "Account Code 6",
"account_code_id": "Account Code ID",
"account_code_uu_id": "Account Code UU ID",
},
)
AccountMasterLanguageModel = dict(
tr={},
en={}
tr={
**CrudCollectionLanguageModel["tr"],
"doc_date": "Belge Tarihi",
"plug_type": "Fiş Türü",
"plug_number": "Fiş Numarası",
"special_code": "Özel Kod",
"authorization_code": "Yetki Kodu",
"doc_code": "Belge Kodu",
"doc_type": "Belge Türü",
"comment_line1": "Yorum Satırı 1",
"comment_line2": "Yorum Satırı 2",
"comment_line3": "Yorum Satırı 3",
"comment_line4": "Yorum Satırı 4",
"comment_line5": "Yorum Satırı 5",
"comment_line6": "Yorum Satırı 6",
"project_code": "Proje Kodu",
"module_no": "Modül No",
"journal_no": "Defter No",
"status_id": "Durum ID",
"canceled": "İptal Edildi",
"print_count": "Yazdırma Sayısı",
"total_active": "Toplam Aktif",
"total_passive": "Toplam Pasif",
"total_active_1": "Toplam Aktif 1",
"total_passive_1": "Toplam Pasif 1",
"total_active_2": "Toplam Aktif 2",
"total_passive_2": "Toplam Pasif 2",
"total_active_3": "Toplam Aktif 3",
"total_passive_3": "Toplam Pasif 3",
"total_active_4": "Toplam Aktif 4",
"total_passive_4": "Toplam Pasif 4",
"cross_ref": "Çapraz Referans",
"data_center_id": "Veri Merkezi ID",
"data_center_rec_num": "Veri Merkezi Kayıt Numarası",
"account_header_id": "Hesap Başlığı ID",
"account_header_uu_id": "Hesap Başlığı UU ID",
"project_item_id": "Proje Öğesi ID",
"project_item_uu_id": "Proje Öğesi UU ID",
"department_id": "Departman ID",
"department_uu_id": "Departman UU ID",
},
en={
**CrudCollectionLanguageModel["en"],
"doc_date": "Document Date",
"plug_type": "Plug Type",
"plug_number": "Plug Number",
"special_code": "Special Code",
"authorization_code": "Authorization Code",
"doc_code": "Document Code",
"doc_type": "Document Type",
"comment_line1": "Comment Line 1",
"comment_line2": "Comment Line 2",
"comment_line3": "Comment Line 3",
"comment_line4": "Comment Line 4",
"comment_line5": "Comment Line 5",
"comment_line6": "Comment Line 6",
"project_code": "Project Code",
"module_no": "Module No",
"journal_no": "Journal No",
"status_id": "Status ID",
"canceled": "Canceled",
"print_count": "Print Count",
"total_active": "Total Active",
"total_passive": "Total Passive",
"total_active_1": "Total Active 1",
"total_passive_1": "Total Passive 1",
"total_active_2": "Total Active 2",
"total_passive_2": "Total Passive 2",
"total_active_3": "Total Active 3",
"total_passive_3": "Total Passive 3",
"total_active_4": "Total Active 4",
"total_passive_4": "Total Passive 4",
"cross_ref": "Cross Reference",
"data_center_id": "Data Center ID",
"data_center_rec_num": "Data Center Record Number",
"account_header_id": "Account Header ID",
"account_header_uu_id": "Account Header UU ID",
"project_item_id": "Project Item ID",
"project_item_uu_id": "Project Item UU ID",
"department_id": "Department ID",
"department_uu_id": "Department UU ID",
},
)
AccountDetailLanguageModel = dict(
tr={},
en={}
tr={
**CrudCollectionLanguageModel["tr"],
"doc_date": "Belge Tarihi",
"plug_type": "Fiş Türü",
"plug_number": "Fiş Numarası",
"special_code": "Özel Kod",
"authorization_code": "Yetki Kodu",
"doc_code": "Belge Kodu",
"doc_type": "Belge Türü",
"comment_line1": "Yorum Satırı 1",
"comment_line2": "Yorum Satırı 2",
"comment_line3": "Yorum Satırı 3",
"comment_line4": "Yorum Satırı 4",
"comment_line5": "Yorum Satırı 5",
"comment_line6": "Yorum Satırı 6",
"project_code": "Proje Kodu",
"module_no": "Modül No",
"journal_no": "Defter No",
"status_id": "Durum ID",
"canceled": "İptal Edildi",
"print_count": "Yazdırma Sayısı",
"total_active": "Toplam Aktif",
"total_passive": "Toplam Pasif",
"total_active_1": "Toplam Aktif 1",
"total_passive_1": "Toplam Pasif 1",
"total_active_2": "Toplam Aktif 2",
"total_passive_2": "Toplam Pasif 2",
"total_active_3": "Toplam Aktif 3",
"total_passive_3": "Toplam Pasif 3",
"total_active_4": "Toplam Aktif 4",
"total_passive_4": "Toplam Pasif 4",
"cross_ref": "Çapraz Referans",
"data_center_id": "Veri Merkezi ID",
"data_center_rec_num": "Veri Merkezi Kayıt Numarası",
"account_header_id": "Hesap Başlığı ID",
"account_header_uu_id": "Hesap Başlığı UU ID",
"project_item_id": "Proje Öğesi ID",
"project_item_uu_id": "Proje Öğesi UU ID",
"department_id": "Departman ID",
"department_uu_id": "Departman UU ID",
},
en={
**CrudCollectionLanguageModel["en"],
"doc_date": "Document Date",
"plug_type": "Plug Type",
"plug_number": "Plug Number",
"special_code": "Special Code",
"authorization_code": "Authorization Code",
"doc_code": "Document Code",
"doc_type": "Document Type",
"comment_line1": "Comment Line 1",
"comment_line2": "Comment Line 2",
"comment_line3": "Comment Line 3",
"comment_line4": "Comment Line 4",
"comment_line5": "Comment Line 5",
"comment_line6": "Comment Line 6",
"project_code": "Project Code",
"module_no": "Module No",
"journal_no": "Journal No",
"status_id": "Status ID",
"canceled": "Canceled",
"print_count": "Print Count",
"total_active": "Total Active",
"total_passive": "Total Passive",
"total_active_1": "Total Active 1",
"total_passive_1": "Total Passive 1",
"total_active_2": "Total Active 2",
"total_passive_2": "Total Passive 2",
"total_active_3": "Total Active 3",
"total_passive_3": "Total Passive 3",
"total_active_4": "Total Active 4",
"total_passive_4": "Total Passive 4",
"cross_ref": "Cross Reference",
"data_center_id": "Data Center ID",
"data_center_rec_num": "Data Center Record Number",
"account_header_id": "Account Header ID",
"account_header_uu_id": "Account Header UU ID",
"project_item_id": "Project Item ID",
"project_item_uu_id": "Project Item UU ID",
"department_id": "Department ID",
"department_uu_id": "Department UU ID",
},
)
AccountRecordsLanguageModel = dict(
tr={},
en={}
tr={
**CrudCollectionLanguageModel["tr"],
"iban": "IBAN",
"bank_date": "Banka Tarihi",
"currency_value": "Döviz Değeri",
"bank_balance": "Banka Bakiyesi",
"currency": "Döviz",
"additional_balance": "Ek Bakiye",
"channel_branch": "Kanal Şubesi",
"process_name": "İşlem Türü Adı",
"process_type": "İşlem Türü",
"process_comment": "İşlem Kayıt Yorumu",
"process_garbage": "İşlem Kayıt Çöpü",
"bank_reference_code": "Banka Referans Kodu",
"add_comment_note": "Yorum Not Ekle",
"is_receipt_mail_send": "Alındı Mail Gönderildi",
"found_from": "Bulunduğu",
"similarity": "Benzerlik",
"remainder_balance": "Kalan Bakiye",
"bank_date_y": "Banka Tarihi Yıl",
"bank_date_m": "Banka Tarihi Ay",
"bank_date_w": "Banka Tarihi Hafta",
"bank_date_d": "Banka Tarihi Gün",
"approving_accounting_record": "Onaylayan Muhasebe Kaydı",
"accounting_receipt_date": "Muhasebe Alındı Tarihi",
"accounting_receipt_number": "Muhasebe Alındı Numarası",
"status_id": "Durum ID",
"approved_record": "Onaylanmış Kayıt",
"import_file_name": "İçe Aktarım Dosya Adı",
"receive_debit": "Alacak Borç",
"receive_debit_uu_id": "Alacak Borç UU ID",
"budget_type": "Bütçe Türü",
"budget_type_uu_id": "Bütçe Türü UU ID",
"company_id": "Şirket ID",
"company_uu_id": "Şirket UU ID",
"send_company_id": "Gönderen Şirket ID",
"send_company_uu_id": "Gönderen Şirket UU ID",
"send_person_id": "Gönderen Kişi ID",
"send_person_uu_id": "Gönderen Kişi UU ID",
"approving_accounting_person": "Onaylayan Muhasebe Kişi",
"approving_accounting_person_uu_id": "Onaylayan Muhasebe Kişi UU ID",
"living_space_id": "Yaşam Alanı ID",
"living_space_uu_id": "Yaşam Alanı UU ID",
"customer_id": "Müşteri ID",
"customer_uu_id": "Müşteri UU ID",
"build_id": "Bina ID",
"build_uu_id": "Bina UU ID",
"build_parts_id": "Bina Parça ID",
"build_parts_uu_id": "Bina Parça UU ID",
"build_decision_book_id": "Bina Karar Defteri ID",
"build_decision_book_uu_id": "Bina Karar Defteri UU ID",
},
en={
**CrudCollectionLanguageModel["en"],
"iban": "IBAN",
"bank_date": "Bank Date",
"currency_value": "Currency Value",
"bank_balance": "Bank Balance",
"currency": "Currency",
"additional_balance": "Additional Balance",
"channel_branch": "Channel Branch",
"process_name": "Process Type Name",
"process_type": "Process Type",
"process_comment": "Process Record Comment",
"process_garbage": "Process Record Garbage",
"bank_reference_code": "Bank Reference Code",
"add_comment_note": "Add Comment Note",
"is_receipt_mail_send": "Is Receipt Mail Send",
"found_from": "Found From",
"similarity": "Similarity",
"remainder_balance": "Remainder Balance",
"bank_date_y": "Bank Date Year",
"bank_date_m": "Bank Date Month",
"bank_date_w": "Bank Date Week",
"bank_date_d": "Bank Date Day",
"approving_accounting_record": "Approving Accounting Record",
"accounting_receipt_date": "Accounting Receipt Date",
"accounting_receipt_number": "Accounting Receipt Number",
"status_id": "Status ID",
"approved_record": "Approved Record",
"import_file_name": "Import File Name",
"receive_debit": "Receive Debit",
"receive_debit_uu_id": "Receive Debit UU ID",
"budget_type": "Budget Type",
"budget_type_uu_id": "Budget Type UU ID",
"company_id": "Company ID",
"company_uu_id": "Company UU ID",
"send_company_id": "Send Company ID",
"send_company_uu_id": "Send Company UU ID",
"send_person_id": "Send Person ID",
"send_person_uu_id": "Send Person UU ID",
"approving_accounting_person": "Approving Accounting Person",
"approving_accounting_person_uu_id": "Approving Accounting Person UU ID",
"living_space_id": "Living Space ID",
"living_space_uu_id": "Living Space UU ID",
"customer_id": "Customer ID",
"customer_uu_id": "Customer UU ID",
"build_id": "Build ID",
"build_uu_id": "Build UU ID",
"build_parts_id": "Build Parts ID",
"build_parts_uu_id": "Build Parts UU ID",
"build_decision_book_id": "Build Decision Book ID",
"build_decision_book_uu_id": "Build Decision Book UU ID",
},
)
AccountRecordExchangesLanguageModel = dict(
tr={},
en={}
tr={
**CrudCollectionLanguageModel["tr"],
"are_currency": "Para Birimi",
"are_exchange_rate": "Döviz Kuru",
"usd_exchange_rate_value": "USD Döviz Kuru Değeri",
"eur_exchange_rate_value": "EUR Döviz Kuru Değeri",
"gbp_exchange_rate_value": "GBP Döviz Kuru Değeri",
"cny_exchange_rate_value": "CNY Döviz Kuru Değeri",
"account_records_id": "Hesap Kayıt ID",
"account_records_uu_id": "Hesap Kayıt UU ID",
},
en={
**CrudCollectionLanguageModel["en"],
"are_currency": "Currency",
"are_exchange_rate": "Exchange Rate",
"usd_exchange_rate_value": "USD Exchange Rate Value",
"eur_exchange_rate_value": "EUR Exchange Rate Value",
"gbp_exchange_rate_value": "GBP Exchange Rate Value",
"cny_exchange_rate_value": "CNY Exchange Rate Value",
"account_records_id": "Account Record ID",
"account_records_uu_id": "Account Record UU ID",
},
)

View File

@@ -1,113 +1,53 @@
from sqlalchemy.orm import mapped_column, Mapped
from sqlalchemy import String, ForeignKey, Index, TIMESTAMP, SmallInteger, Identity
from databases.sql_models.core_mixin import CrudCollection
from databases.language_models.Mixins.crud_mixin import CrudCollectionLanguageModel
class BuildIbans(CrudCollection):
"""
BuildParts class based on declarative_base and BaseMixin via session
"""
__tablename__ = "build_ibans"
__exclude__fields__ = []
iban: Mapped[str] = mapped_column(
String(40), server_default="", nullable=False, comment="IBAN number"
)
start_date: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP(timezone=True), nullable=False, comment="Bank Transaction Start Date"
)
stop_date: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP(timezone=True), 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[int] = mapped_column(
ForeignKey("build.id"), nullable=True, comment="Building ID"
)
build_uu_id: Mapped[str] = mapped_column(
String, nullable=True, comment="Building UUID", index=True
)
# building: Mapped["Build"] = relationship(
# "Build", back_populates="build_ibans", foreign_keys=[build_id]
# )
__table_args__ = (
Index("_build_ibans_ndx_01", iban, start_date, unique=True),
{"comment": "IBANs related to money transactions due to building objects"},
)
# @property
# def enums(self):
# return_dict = {}
# for key, enum in self.__enums_list__.items():
# for enum_item in EnumDropdown.filter_by(enum_class=enum):
# return_dict[key] = {
# enum_item.get_dict(include=["key", "value", "description"])
# }
# return return_dict
BuildIbansLanguageModel = dict(
tr={
**CrudCollectionLanguageModel["tr"],
"iban": "IBAN Numarası",
"start_date": "Banka İşlem Başlangıç Tarihi",
"stop_date": "Banka İşlem Bitiş Tarihi",
"bank_code": "Banka Kodu",
"xcomment": "Yorum",
"build_id": "Bina ID",
"build_uu_id": "Bina UUID",
},
en={
**CrudCollectionLanguageModel["en"],
"iban": "IBAN Number",
"start_date": "Bank Transaction Start Date",
"stop_date": "Bank Transaction End Date",
"bank_code": "Bank Code",
"xcomment": "Comment",
"build_id": "Build ID",
"build_uu_id": "Build UUID",
},
)
class BuildIbanDescription(CrudCollection):
"""
SearchComments class based on declarative_base and CrudCollection via session
"""
__tablename__ = "build_iban_description"
__exclude__fields__ = []
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[int] = 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[int] = mapped_column(ForeignKey("people.id"), nullable=True)
customer_uu_id: Mapped[str] = mapped_column(
String, nullable=True, comment="Customer UUID"
)
company_id: Mapped[int] = mapped_column(ForeignKey("companies.id"), nullable=True)
company_uu_id: Mapped[str] = mapped_column(
String, nullable=True, comment="Company UUID"
)
build_parts_id: Mapped[int] = mapped_column(
ForeignKey("build_parts.id"), nullable=True
)
build_parts_uu_id: Mapped[str] = mapped_column(
String, nullable=True, comment="Build Parts UUID"
)
# decision_book_project: Mapped["BuildDecisionBookProjects"] = relationship(
# "BuildDecisionBookProjects",
# back_populates="search_iban_description",
# foreign_keys=[decision_book_project_id],
# )
# customer: Mapped["People"] = relationship(
# "People", back_populates="search_iban_description", foreign_keys=[customer_id]
# )
# company: Mapped["Companies"] = relationship(
# "Company", back_populates="search_iban_description", foreign_keys=[company_id]
# )
# parts: Mapped["BuildParts"] = relationship(
# "BuildParts",
# back_populates="search_iban_description",
# foreign_keys=[build_parts_id],
# )
__table_args__ = (
Index(
"_search_iban_description_ndx_00", iban, search_word, group_id, unique=True
),
{"comment": "Search Iban Description Information"},
)
BuildIbanDescriptionLanguageModel = dict(
tr={
**CrudCollectionLanguageModel["tr"],
"iban": "IBAN Numarası",
"group_id": "Grup ID",
"search_word": "Arama Kelimesi",
"customer_id": "Müşteri ID",
"customer_uu_id": "Müşteri UUID",
"company_id": "Şirket ID",
"company_uu_id": "Şirket UUID",
"build_parts_id": "Bina Parça ID",
"build_parts_uu_id": "Bina Parça UUID",
},
en={
**CrudCollectionLanguageModel["en"],
"iban": "IBAN Number",
"group_id": "Group ID",
"search_word": "Search Word",
"customer_id": "Customer ID",
"customer_uu_id": "Customer UUID",
"company_id": "Company ID",
"company_uu_id": "Company UUID",
"build_parts_id": "Build Parts ID",
"build_parts_uu_id": "Build Parts UUID",
},
)