services api
This commit is contained in:
@@ -7,6 +7,8 @@ from Schemas.account.account import (
|
||||
AccountRecordExchanges,
|
||||
AccountRecords,
|
||||
AccountDelayInterest,
|
||||
AccountRecordsPredict,
|
||||
AccountRecordsModelTrain,
|
||||
)
|
||||
from Schemas.account.iban import (
|
||||
BuildIbans,
|
||||
@@ -126,6 +128,8 @@ __all__ = [
|
||||
"AccountRecordExchanges",
|
||||
"AccountRecords",
|
||||
"AccountDelayInterest",
|
||||
"AccountRecordsPredict",
|
||||
"AccountRecordsModelTrain",
|
||||
"BuildIbans",
|
||||
"BuildIbanDescription",
|
||||
"RelationshipEmployee2PostCode",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from Schemas.base_imports import (
|
||||
CrudCollection,
|
||||
String,
|
||||
Text,
|
||||
Integer,
|
||||
Boolean,
|
||||
ForeignKey,
|
||||
@@ -384,9 +385,9 @@ class AccountRecordsPredict(CrudCollection):
|
||||
|
||||
account_records_id: Mapped[int] = mapped_column(ForeignKey("account_records.id"), nullable=False)
|
||||
account_records_uu_id: Mapped[str] = mapped_column(String(100), nullable=False)
|
||||
prediction_model: Mapped[str] = mapped_column(String(10), nullable=False)
|
||||
prediction_result: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
prediction_field: Mapped[str] = mapped_column(String(10), nullable=False, server_default="")
|
||||
prediction_model: Mapped[str] = mapped_column(String, nullable=False)
|
||||
prediction_result: Mapped[str] = mapped_column(Text, nullable=False)
|
||||
prediction_field: Mapped[str] = mapped_column(String, nullable=False, server_default="")
|
||||
treshold: Mapped[float] = mapped_column(Numeric(18, 6), nullable=True)
|
||||
is_first_prediction: Mapped[bool] = mapped_column(Boolean, server_default="0")
|
||||
is_approved: Mapped[bool] = mapped_column(Boolean, server_default="0")
|
||||
|
||||
@@ -211,49 +211,22 @@ class People(CrudCollection):
|
||||
"tax_no",
|
||||
]
|
||||
|
||||
firstname: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="First name of the person"
|
||||
)
|
||||
surname: Mapped[str] = mapped_column(
|
||||
String(24), nullable=False, comment="Surname of the person"
|
||||
)
|
||||
middle_name: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Middle name of the person"
|
||||
)
|
||||
sex_code: Mapped[str] = mapped_column(
|
||||
String(1), nullable=False, comment="Sex code of the person (e.g., M/F)"
|
||||
)
|
||||
person_ref: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Reference ID for the person"
|
||||
)
|
||||
person_tag: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Unique tag for the person"
|
||||
)
|
||||
firstname: Mapped[str] = mapped_column(String, nullable=False, comment="First name of the person")
|
||||
surname: Mapped[str] = mapped_column(String(24), nullable=False, comment="Surname of the person")
|
||||
middle_name: Mapped[str] = mapped_column(String, server_default="", comment="Middle name of the person")
|
||||
birthname: Mapped[str] = mapped_column(String, nullable=True, server_default="", comment="Birth name of the person")
|
||||
sex_code: Mapped[str] = mapped_column(String(1), nullable=False, comment="Sex code of the person (e.g., M/F)")
|
||||
person_ref: Mapped[str] = mapped_column(String, server_default="", comment="Reference ID for the person")
|
||||
person_tag: Mapped[str] = mapped_column(String, server_default="", comment="Unique tag for the person")
|
||||
|
||||
# ENCRYPT DATA
|
||||
father_name: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Father's name of the person"
|
||||
)
|
||||
mother_name: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Mother's name of the person"
|
||||
)
|
||||
country_code: Mapped[str] = mapped_column(
|
||||
String(4), server_default="TR", comment="Country code of the person"
|
||||
)
|
||||
national_identity_id: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="National identity ID of the person"
|
||||
)
|
||||
birth_place: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Birth place of the person"
|
||||
)
|
||||
birth_date: Mapped[TIMESTAMP] = mapped_column(
|
||||
TIMESTAMP(timezone=True),
|
||||
server_default="1900-01-01",
|
||||
comment="Birth date of the person",
|
||||
)
|
||||
tax_no: Mapped[str] = mapped_column(
|
||||
String, server_default="", comment="Tax number of the person"
|
||||
)
|
||||
father_name: Mapped[str] = mapped_column(String, server_default="", comment="Father's name of the person")
|
||||
mother_name: Mapped[str] = mapped_column(String, server_default="", comment="Mother's name of the person")
|
||||
country_code: Mapped[str] = mapped_column(String(4), server_default="TR", comment="Country code of the person")
|
||||
national_identity_id: Mapped[str] = mapped_column(String, server_default="", comment="National identity ID of the person")
|
||||
birth_place: Mapped[str] = mapped_column(String, server_default="", comment="Birth place of the person")
|
||||
birth_date: Mapped[TIMESTAMP] = mapped_column(TIMESTAMP(timezone=True), server_default="1900-01-01", comment="Birth date of the person")
|
||||
tax_no: Mapped[str] = mapped_column(String, server_default="", comment="Tax number of the person")
|
||||
# Receive at Create person
|
||||
# language = mapped_column(
|
||||
# String, comment="Language code of the person"
|
||||
@@ -262,10 +235,7 @@ class People(CrudCollection):
|
||||
# String, comment="Currency code of the person"
|
||||
# )
|
||||
|
||||
# ENCRYPT DATA
|
||||
user = relationship(
|
||||
"Users", back_populates="person", foreign_keys="Users.person_id"
|
||||
)
|
||||
user = relationship("Users", back_populates="person", foreign_keys="Users.person_id")
|
||||
|
||||
__table_args__ = (
|
||||
Index(
|
||||
|
||||
Reference in New Issue
Block a user