auth service up running
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
from databases.sql_models.core_mixin import CrudCollection
|
||||
from databases.language_models.event.event import (
|
||||
EventsLanguageModel,
|
||||
ModulesLanguageModel,
|
||||
ServicesLanguageModel,
|
||||
Service2EventsLanguageModel,
|
||||
Event2OccupantExtraLanguageModel,
|
||||
Event2EmployeeExtraLanguageModel,
|
||||
Event2EmployeeLanguageModel,
|
||||
Event2OccupantLanguageModel,
|
||||
ModulePriceLanguageModel,
|
||||
)
|
||||
|
||||
from sqlalchemy import (
|
||||
String,
|
||||
@@ -20,6 +31,7 @@ class Events(CrudCollection):
|
||||
|
||||
__tablename__ = "events"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = EventsLanguageModel
|
||||
|
||||
event_type: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Event Type"
|
||||
@@ -58,6 +70,7 @@ class Modules(CrudCollection):
|
||||
|
||||
__tablename__ = "modules"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = ModulesLanguageModel
|
||||
|
||||
module_name: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Module Name"
|
||||
@@ -92,6 +105,7 @@ class Services(CrudCollection):
|
||||
|
||||
__tablename__ = "services"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = ServicesLanguageModel
|
||||
|
||||
module_id: Mapped[int] = mapped_column(ForeignKey("modules.id"), nullable=False)
|
||||
module_uu_id: Mapped[str] = mapped_column(
|
||||
@@ -137,6 +151,7 @@ class Service2Events(CrudCollection):
|
||||
|
||||
__tablename__ = "services2events"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = Service2EventsLanguageModel
|
||||
|
||||
service_id: Mapped[int] = mapped_column(ForeignKey("services.id"), nullable=False)
|
||||
service_uu_id = mapped_column(String, nullable=False, comment="Service UUID")
|
||||
@@ -150,6 +165,7 @@ class Event2OccupantExtra(CrudCollection):
|
||||
|
||||
__tablename__ = "event2occupant_extra"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = Event2OccupantExtraLanguageModel
|
||||
|
||||
build_living_space_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_living_space.id"), nullable=False
|
||||
@@ -180,6 +196,7 @@ class Event2EmployeeExtra(CrudCollection):
|
||||
|
||||
__tablename__ = "event2employee_extra"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = Event2EmployeeExtraLanguageModel
|
||||
|
||||
employee_id: Mapped[int] = mapped_column(ForeignKey("employees.id"), nullable=False)
|
||||
employee_uu_id: Mapped[str] = mapped_column(
|
||||
@@ -209,6 +226,7 @@ class Event2Employee(CrudCollection):
|
||||
|
||||
__tablename__ = "event2employee"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = Event2EmployeeLanguageModel
|
||||
|
||||
employee_id: Mapped[int] = mapped_column(ForeignKey("employees.id"), nullable=False)
|
||||
employee_uu_id: Mapped[str] = mapped_column(
|
||||
@@ -257,6 +275,7 @@ class Event2Occupant(CrudCollection):
|
||||
|
||||
__tablename__ = "event2occupant"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = Event2OccupantLanguageModel
|
||||
|
||||
build_living_space_id: Mapped[str] = mapped_column(
|
||||
ForeignKey("build_living_space.id"), nullable=False
|
||||
@@ -309,6 +328,7 @@ class ModulePrice(CrudCollection):
|
||||
|
||||
__tablename__ = "module_price"
|
||||
__exclude__fields__ = []
|
||||
__language_model__ = ModulePriceLanguageModel
|
||||
|
||||
campaign_code: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Campaign Code"
|
||||
@@ -336,73 +356,3 @@ class ModulePrice(CrudCollection):
|
||||
) # sana düz 75.00 TL yapar
|
||||
|
||||
__table_args__ = ({"comment": "ModulePrice Information"},)
|
||||
|
||||
|
||||
# class Modules2Occupant(CrudCollection):
|
||||
# """
|
||||
# ModulesOccupantPrices class based on declarative_base and BaseMixin via session
|
||||
# discounted_price - calculated_price = Pazarlamaya gider yazılır 3 TL
|
||||
# """
|
||||
#
|
||||
# __tablename__ = "modules2_occupant"
|
||||
#
|
||||
#
|
||||
# discounted_percentage: Mapped[float] = mapped_column(Numeric(6, 2), server_default="0.00") # %22
|
||||
# discounted_price = mapped_column(
|
||||
# Numeric(20, 2), server_default="0.00"
|
||||
# ) # Normal: 78.00 TL
|
||||
# calculated_price = mapped_column(
|
||||
# Numeric(20, 2), server_default="0.00"
|
||||
# ) # sana düz 75.00 TL yapar
|
||||
#
|
||||
# service_id = mapped_column(ForeignKey("services.id"), nullable=False)
|
||||
# build_living_space_id = mapped_column(
|
||||
# ForeignKey("build_living_space.id"), nullable=False, index=True
|
||||
# )
|
||||
#
|
||||
# __table_args__ = ({"comment": "ModulesOccupantPrices Information"},)
|
||||
#
|
||||
#
|
||||
# class Modules2Employee(CrudCollection):
|
||||
# """
|
||||
# Modules2EmployeeServices class based on declarative_base and BaseMixin via session
|
||||
# """
|
||||
#
|
||||
# __tablename__ = "modules2_employee"
|
||||
#
|
||||
# discounted_percentage: Mapped[float] = mapped_column(Numeric(6, 2), server_default="0.00") # %22
|
||||
# discounted_price = mapped_column(
|
||||
# Numeric(20, 2), server_default="0.00"
|
||||
# ) # Normal: 78.00 TL
|
||||
# calculated_price = mapped_column(
|
||||
# Numeric(20, 2), server_default="0.00"
|
||||
# ) # sana düz 75.00 TL yapar
|
||||
#
|
||||
# service_id = mapped_column(ForeignKey("services.id"), nullable=False)
|
||||
# employee_id = mapped_column(ForeignKey("employees.id"), nullable=False)
|
||||
#
|
||||
# __table_args__ = ({"comment": "Modules2EmployeeServices Information"},)
|
||||
# class Actions(CrudCollection):
|
||||
# """
|
||||
# Actions class based on declarative_base and BaseMixin via session
|
||||
# """
|
||||
#
|
||||
# __tablename__ = "actions"
|
||||
# __exclude__fields__ = []
|
||||
#
|
||||
# action_table = mapped_column(String, nullable=False, comment="Action Table")
|
||||
# action_type = mapped_column(String, nullable=False, comment="Action Type")
|
||||
# action_description = mapped_column(String, server_default="")
|
||||
# action_code = mapped_column(String, nullable=False, comment="Action Code")
|
||||
# endpoint_id = mapped_column(ForeignKey("endpoint_restriction.id"), nullable=True)
|
||||
# endpoint_uu_id = mapped_column(String, nullable=True, comment="Endpoint UUID")
|
||||
#
|
||||
# @property
|
||||
# def action_name(self):
|
||||
# return f"{self.action_table} {self.action_type}"
|
||||
#
|
||||
# @property
|
||||
# def total_cost(self):
|
||||
# return self.cost * self.unit_price
|
||||
#
|
||||
# __table_args__ = ({"comment": "Actions Information"},)
|
||||
|
||||
Reference in New Issue
Block a user