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,7 +1,3 @@
from api_validations.validations_request import ListOptions
from databases.language_models.account.account import AccountBooksLanguageModel
from databases.sql_models.core_mixin import CrudCollection
from sqlalchemy.orm import mapped_column, Mapped
from sqlalchemy import (
String,
@@ -14,6 +10,16 @@ from sqlalchemy import (
Numeric,
UUID,
)
from databases.sql_models.core_mixin import CrudCollection
from databases.language_models import (
AccountBooksLanguageModel,
AccountDetailLanguageModel,
AccountMasterLanguageModel,
AccountRecordExchangesLanguageModel,
AccountCodesLanguageModel,
AccountRecordsLanguageModel,
AccountCodeParserLanguageModel,
)
class AccountBooks(CrudCollection):
@@ -53,12 +59,11 @@ class AccountBooks(CrudCollection):
)
class AccountCodes(CrudCollection):
__tablename__ = "account_codes"
__exclude__fields__ = []
__language_model__ = AccountCodesLanguageModel
account_code: Mapped[str] = mapped_column(
String(48), nullable=False, comment="Account Code"
@@ -115,6 +120,7 @@ class AccountCodeParser(CrudCollection):
__tablename__ = "account_code_parser"
__exclude__fields__ = []
__language_model__ = AccountCodeParserLanguageModel
account_code_1: Mapped[str] = mapped_column(String, nullable=False, comment="Order")
account_code_2: Mapped[str] = mapped_column(String, nullable=False, comment="Order")
@@ -159,6 +165,7 @@ class AccountMaster(CrudCollection):
__tablename__ = "account_master"
__exclude__fields__ = []
__language_model__ = AccountMasterLanguageModel
doc_date: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP(timezone=True), nullable=False, comment="Document Date"
@@ -246,6 +253,7 @@ class AccountDetail(CrudCollection):
__tablename__ = "account_detail"
__exclude__fields__ = []
__enum_list__ = [("plug_type", "AccountingReceiptTypes", "M")]
__language_model__ = AccountDetailLanguageModel
doc_date: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP(timezone=True), nullable=False, comment="Document Date"
@@ -385,6 +393,7 @@ class AccountRecords(CrudCollection):
("receive_debit", "DebitTypes", "D"),
("budget_type", "BudgetType", "B"),
]
__language_model__ = AccountRecordsLanguageModel
iban: Mapped[str] = mapped_column(
String(64), nullable=False, comment="IBAN Number of Bank"
@@ -723,8 +732,10 @@ class AccountRecords(CrudCollection):
class AccountRecordExchanges(CrudCollection):
__tablename__ = "account_record_exchanges"
__exclude__fields__ = []
__language_model__ = AccountRecordExchangesLanguageModel
are_currency: Mapped[str] = mapped_column(
String(5), nullable=False, comment="Unit of Currency"