services api

This commit is contained in:
2025-07-31 17:26:30 +03:00
parent 479104a04f
commit 1f8db23f75
56 changed files with 1976 additions and 120 deletions

View File

@@ -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(