language models accounts are updated
This commit is contained in:
parent
45ed5b86fd
commit
2c5b6956c8
|
|
@ -6,7 +6,12 @@
|
|||
<component name="ChangeListManager">
|
||||
<list default="true" id="b5202e0c-6ddf-4a56-a13a-e18798c4c7cf" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Events/AllEvents/validations/validation/function_handlers.py" beforeDir="false" afterPath="$PROJECT_DIR$/Events/AllEvents/validations/validation/function_handlers.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Events/AllEvents/authentication/auth/function_handlers.py" beforeDir="false" afterPath="$PROJECT_DIR$/Events/AllEvents/authentication/auth/function_handlers.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Events/AllEvents/events/account/cluster.py" beforeDir="false" afterPath="$PROJECT_DIR$/Events/AllEvents/events/account/cluster.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Events/AllEvents/events/account/function_handlers.py" beforeDir="false" afterPath="$PROJECT_DIR$/Events/AllEvents/events/account/function_handlers.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Events/AllEvents/events/account/info.py" beforeDir="false" afterPath="$PROJECT_DIR$/Events/AllEvents/events/account/info.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Events/Engine/abstract_class.py" beforeDir="false" afterPath="$PROJECT_DIR$/Events/Engine/abstract_class.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Events/base_request_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/Events/base_request_model.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
|
|||
|
|
@ -225,8 +225,12 @@ class AuthenticationFunctions(BaseRouteModel):
|
|||
request: FastAPI request object
|
||||
data: Request body containing login credentials
|
||||
{
|
||||
"domain": "evyos.com.tr", "access_key": "karatay.berkay.sup@evyos.com.tr",
|
||||
"password": "string", "remember_me": false
|
||||
"data": {
|
||||
"domain": "evyos.com.tr",
|
||||
"access_key": "karatay.berkay.sup@evyos.com.tr",
|
||||
"password": "string",
|
||||
"remember_me": false
|
||||
}
|
||||
}
|
||||
Returns:
|
||||
SuccessResponse containing authentication token and user info
|
||||
|
|
@ -247,6 +251,13 @@ class AuthenticationFunctions(BaseRouteModel):
|
|||
"""
|
||||
Handle selection of company or occupant type
|
||||
{"data": {"build_living_space_uu_id": ""}} | {"data": {"company_uu_id": ""}}
|
||||
{
|
||||
"data": {"company_uu_id": "e9869a25-ba4d-49dc-bb0d-8286343b184b"}
|
||||
}
|
||||
|
||||
{
|
||||
"data": {"build_living_space_uu_id": "e9869a25-ba4d-49dc-bb0d-8286343b184b"}
|
||||
}
|
||||
"""
|
||||
selection_dict = dict(
|
||||
request=cls.context_retriever.request,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
from Events.Engine.abstract_class import DefaultClusterName
|
||||
|
||||
|
||||
cluster_name = "AccountCluster"
|
||||
prefix = "/accounts"
|
||||
icon = "Building"
|
||||
|
||||
|
||||
# Keys for the cluster
|
||||
class KeyValidations:
|
||||
headers = "headers"
|
||||
data = "data"
|
||||
validation = "validations"
|
||||
|
||||
|
||||
# Keys for the cluster
|
||||
class KeyBases:
|
||||
create_key = f"{prefix}/create"
|
||||
update_key = f"{prefix}/update"
|
||||
list_key = f"{prefix}/list"
|
||||
|
||||
|
||||
# Page Variations of the cluster
|
||||
class PageBases:
|
||||
CREATE = f"/create?{DefaultClusterName}={cluster_name}"
|
||||
UPDATE = f"/update?{DefaultClusterName}={cluster_name}"
|
||||
DASHBOARD = f"/dashboard?{DefaultClusterName}={cluster_name}"
|
||||
|
||||
|
||||
class Page2Keys:
|
||||
KeyBases.create_key = PageBases.CREATE
|
||||
KeyBases.update_key = PageBases.UPDATE
|
||||
KeyBases.list_key = PageBases.DASHBOARD
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
from Events.Engine.abstract_class import CategoryCluster
|
||||
|
||||
from .account_records import (
|
||||
AccountRecordsListEventMethods,
|
||||
AccountRecordsCreateEventMethods,
|
||||
AccountRecordsUpdateEventMethods,
|
||||
)
|
||||
from .info import account_page_info
|
||||
from .bases import cluster_name, prefix
|
||||
from .info import page_infos
|
||||
|
||||
|
||||
AccountCluster = CategoryCluster(
|
||||
name="AccountCluster",
|
||||
name=cluster_name,
|
||||
tags=["Account Records"],
|
||||
prefix="/accounts",
|
||||
description="Account Cluster",
|
||||
pageinfo=account_page_info,
|
||||
prefix=prefix,
|
||||
description="Account Cluster Actions",
|
||||
pageinfo=page_infos,
|
||||
endpoints={
|
||||
"AccountRecordsListEventMethods": AccountRecordsListEventMethods,
|
||||
"AccountRecordsCreateEventMethods": AccountRecordsCreateEventMethods,
|
||||
"AccountRecordsUpdateEventMethods": AccountRecordsUpdateEventMethods,
|
||||
"AccountRecordsListEventMethods": AccountRecordsListEventMethods,
|
||||
},
|
||||
include_in_schema=True,
|
||||
sub_category=[],
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class AccountUpdateEventMethods(BaseRouteModel):
|
|||
AccountRecords.build_parts_id = (
|
||||
cls.context_retriever.token.selected_occupant.build_part_id
|
||||
)
|
||||
account_record = AccountRecords.update_one(build_uu_id, data).data
|
||||
|
||||
# return AlchemyJsonResponse(
|
||||
# completed=True,
|
||||
# message="Account record updated successfully",
|
||||
|
|
|
|||
|
|
@ -1,223 +1,141 @@
|
|||
from Events.Engine.abstract_class import PageInfo
|
||||
from .bases import KeyValidations, cluster_name, KeyBases, PageBases, icon
|
||||
from .account_records import (
|
||||
AccountRecordsUpdateEventMethods,
|
||||
AccountRecordsCreateEventMethods,
|
||||
AccountRecordsListEventMethods,
|
||||
)
|
||||
|
||||
|
||||
cluster_name = "AccountCluster"
|
||||
prefix = "/accounts"
|
||||
|
||||
|
||||
class LanguageModels:
|
||||
SITE_URL: str
|
||||
COMPONENT: str = "Table"
|
||||
PREFIX_URL: str = ""
|
||||
PAGE_INFO: dict
|
||||
STATIC_PATH: str = "events"
|
||||
|
||||
def as_dict(self):
|
||||
return {
|
||||
"SITE_URL": f"/{self.STATIC_PATH}{self.SITE_URL}",
|
||||
"COMPONENT": self.COMPONENT,
|
||||
"PREFIX_URL": self.PREFIX_URL,
|
||||
"PAGE_INFO": self.PAGE_INFO,
|
||||
}
|
||||
|
||||
|
||||
create_key = f"{prefix}{AccountRecordsCreateEventMethods.URL}"
|
||||
update_key = f"{prefix}{AccountRecordsUpdateEventMethods.URL}"
|
||||
list_key = f"{prefix}{AccountRecordsListEventMethods.URL}"
|
||||
|
||||
|
||||
account_language_update_models = LanguageModels()
|
||||
account_language_update_models.COMPONENT = "Link"
|
||||
account_language_update_models.SITE_URL = f"/update?site={cluster_name}"
|
||||
account_language_update_models.PREFIX_URL = (
|
||||
update_key
|
||||
)
|
||||
account_language_update_models.PAGE_INFO = {
|
||||
"en": {
|
||||
"page": "Update Account Records",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Hesap Kayıdı Güncelle",
|
||||
},
|
||||
}
|
||||
account_language_model_as_dict = account_language_update_models.as_dict()
|
||||
|
||||
|
||||
account_language_created_models = LanguageModels()
|
||||
account_language_created_models.COMPONENT = "Link"
|
||||
account_language_created_models.SITE_URL = f"/create?site={cluster_name}"
|
||||
account_language_created_models.PREFIX_URL = (
|
||||
create_key
|
||||
)
|
||||
account_language_created_models.PAGE_INFO = {
|
||||
"en": {
|
||||
"page": "Create Account Records",
|
||||
},
|
||||
"tr": {"page": "Hesap Kayıdı Oluştur"},
|
||||
}
|
||||
account_language_created_models_as_dict = account_language_created_models.as_dict()
|
||||
|
||||
account_language_list_models = LanguageModels()
|
||||
account_language_list_models.COMPONENT = "Table"
|
||||
account_language_list_models.SITE_URL = f"/dashboard?site={cluster_name}"
|
||||
account_language_list_models.PREFIX_URL = (
|
||||
list_key
|
||||
)
|
||||
account_language_list_models.PAGE_INFO = {
|
||||
"en": {
|
||||
"page": "List Account Records",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Hesap Kayıtlarını Listele",
|
||||
},
|
||||
}
|
||||
|
||||
account_language_list_models_as_dict = account_language_list_models.as_dict()
|
||||
|
||||
account_language_create_models = LanguageModels()
|
||||
account_language_create_models.COMPONENT = "Form"
|
||||
account_language_create_models.SITE_URL = f"/create?site={cluster_name}"
|
||||
account_language_create_models.PREFIX_URL = (
|
||||
create_key
|
||||
)
|
||||
account_language_create_models.PAGE_INFO = {
|
||||
"en": {"page": "List Account Records", "button:": "Create"},
|
||||
"tr": {"page": "Hesap Kayıtlarını Listele", "button:": "Oluştur"},
|
||||
}
|
||||
|
||||
account_language_create_models_as_dict = account_language_create_models.as_dict()
|
||||
|
||||
account_language_update_form_models = LanguageModels()
|
||||
account_language_update_form_models.COMPONENT = "Form"
|
||||
account_language_update_form_models.SITE_URL = f"/update?site={cluster_name}"
|
||||
account_language_update_form_models.PREFIX_URL = (
|
||||
update_key
|
||||
)
|
||||
account_language_update_form_models.PAGE_INFO = {
|
||||
"en": {"page": "Update Account Records", "button:": "Update"},
|
||||
"tr": {"page": "Hesap Kayıdı Güncelle", "button:": "Güncelle"},
|
||||
}
|
||||
account_language_update_form_models_as_dict = (
|
||||
account_language_update_form_models.as_dict()
|
||||
from .lang_models import (
|
||||
account_language_create_models_as_dict,
|
||||
account_language_model_as_dict,
|
||||
account_language_list_models_as_dict,
|
||||
account_language_created_models_as_dict,
|
||||
account_language_update_form_models_as_dict,
|
||||
)
|
||||
|
||||
|
||||
dashboard_page_info = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=f"/dashboard?site={cluster_name}",
|
||||
icon="Building",
|
||||
page_info={
|
||||
"en": {
|
||||
"page": "Account Records for reaching user all types account information",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıtları",
|
||||
},
|
||||
},
|
||||
instructions={
|
||||
str(list_key): {
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{prefix}/list", "asked_field": "headers"},
|
||||
class ClustersPageInfo:
|
||||
|
||||
# Cluster Page Infos that are available for the client
|
||||
dashboard_page_info = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=PageBases.DASHBOARD,
|
||||
icon=icon,
|
||||
page_info={
|
||||
"en": {
|
||||
"page": "Account Records for reaching user all types account information",
|
||||
},
|
||||
"data": {
|
||||
"store": True,
|
||||
"url": f"{prefix}/list",
|
||||
"data": dict(page=1, limit=1),
|
||||
"tr": {
|
||||
"page": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıtları",
|
||||
},
|
||||
},
|
||||
},
|
||||
endpoints={
|
||||
str(update_key): AccountRecordsUpdateEventMethods.retrieve_all_event_keys(),
|
||||
str(create_key): AccountRecordsCreateEventMethods.retrieve_all_event_keys(),
|
||||
str(list_key): AccountRecordsListEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
language_models={
|
||||
str(list_key): {
|
||||
str(update_key): account_language_model_as_dict,
|
||||
str(create_key): account_language_created_models_as_dict,
|
||||
str(list_key): account_language_list_models_as_dict,
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
create_page_info = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=f"/create?site={cluster_name}",
|
||||
icon="Building",
|
||||
instructions={
|
||||
str(create_key): {
|
||||
"validation": {
|
||||
"store": True,
|
||||
"url": "/validations/validation",
|
||||
"data": {"event_code": f"{prefix}/create", "asked_field": "validation"},
|
||||
},
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{prefix}/create", "asked_field": "headers"},
|
||||
instructions={
|
||||
str(KeyBases.list_key): {
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{KeyBases.list_key}", "asked_field": KeyValidations.headers},
|
||||
},
|
||||
"data": {
|
||||
"store": True,
|
||||
"url": f"{KeyBases.list_key}",
|
||||
"data": dict(page=1, limit=1),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
page_info={
|
||||
"en": {
|
||||
"page": "Create Account Records for reaching user all types account information",
|
||||
endpoints={
|
||||
str(KeyBases.update_key): AccountRecordsUpdateEventMethods.retrieve_all_event_keys(),
|
||||
str(KeyBases.create_key): AccountRecordsCreateEventMethods.retrieve_all_event_keys(),
|
||||
str(KeyBases.list_key): AccountRecordsListEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
"tr": {
|
||||
"page": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıt Oluştur",
|
||||
language_models={
|
||||
str(KeyBases.list_key): {
|
||||
str(KeyBases.update_key): account_language_model_as_dict,
|
||||
str(KeyBases.create_key): account_language_created_models_as_dict,
|
||||
str(KeyBases.list_key): account_language_list_models_as_dict,
|
||||
}
|
||||
},
|
||||
},
|
||||
endpoints={
|
||||
str(create_key): AccountRecordsCreateEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
language_models={
|
||||
str(create_key): account_language_create_models_as_dict,
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
update_page_info = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=f"/update?site={cluster_name}",
|
||||
icon="Building",
|
||||
instructions={
|
||||
str(update_key): {
|
||||
"validation": {
|
||||
"store": True,
|
||||
"url": "/validations/validation",
|
||||
"data": {"event_code": f"{prefix}/update", "asked_field": "validation"},
|
||||
},
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{prefix}/update", "asked_field": "headers"},
|
||||
create_page_info = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=PageBases.CREATE,
|
||||
icon=icon,
|
||||
instructions={
|
||||
str(KeyBases.create_key): {
|
||||
"validation": {
|
||||
"store": True,
|
||||
"url": "/validations/validation",
|
||||
"data": {"event_code": f"{KeyBases.create_key}", "asked_field": KeyValidations.validation },
|
||||
},
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{KeyBases.create_key}", "asked_field": KeyValidations.headers},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
page_info={
|
||||
"en": {
|
||||
"page": "Update Account Records via all types account information",
|
||||
page_info={
|
||||
"en": {
|
||||
"page": "Create Account Records for reaching user all types account information",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Kullanıcı tüm hesap bilgilerine ulaşmak için Hesap Kayıt Oluştur",
|
||||
},
|
||||
},
|
||||
"tr": {
|
||||
"page": "Tüm hesap bilgileri aracılığıyla Hesap Kayıtlarını Güncelle",
|
||||
endpoints={
|
||||
str(KeyBases.create_key): AccountRecordsCreateEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
},
|
||||
endpoints={
|
||||
str(update_key): AccountRecordsUpdateEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
language_models={
|
||||
str(update_key): account_language_update_form_models_as_dict,
|
||||
},
|
||||
)
|
||||
language_models={
|
||||
str(KeyBases.create_key): account_language_create_models_as_dict,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
account_page_info = {
|
||||
f"/dashboard?site={cluster_name}": dashboard_page_info,
|
||||
f"/create?site={cluster_name}": create_page_info,
|
||||
f"/update?site={cluster_name}": update_page_info,
|
||||
update_page_info = PageInfo(
|
||||
name=f"{cluster_name}",
|
||||
url=PageBases.UPDATE,
|
||||
icon=icon,
|
||||
instructions={
|
||||
str(KeyBases.update_key): {
|
||||
"validation": {
|
||||
"store": True,
|
||||
"url": "/validations/validation",
|
||||
"data": {"event_code": f"{KeyBases.update_key}", "asked_field": KeyValidations.validation},
|
||||
},
|
||||
"headers": {
|
||||
"store": True,
|
||||
"url": "/validations/header",
|
||||
"data": {"event_code": f"{KeyBases.update_key}", "asked_field": KeyValidations.headers},
|
||||
},
|
||||
},
|
||||
},
|
||||
page_info={
|
||||
"en": {
|
||||
"page": "Update Account Records via all types account information",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Tüm hesap bilgileri aracılığıyla Hesap Kayıtlarını Güncelle",
|
||||
},
|
||||
},
|
||||
endpoints={
|
||||
str(KeyBases.update_key): AccountRecordsUpdateEventMethods.retrieve_all_event_keys(),
|
||||
},
|
||||
language_models={
|
||||
str(KeyBases.update_key): account_language_update_form_models_as_dict,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
# Page Variations of the cluster
|
||||
page_infos = {
|
||||
ClustersPageInfo.dashboard_page_info.URL: ClustersPageInfo.dashboard_page_info,
|
||||
ClustersPageInfo.create_page_info.URL: ClustersPageInfo.create_page_info,
|
||||
ClustersPageInfo.update_page_info.URL: ClustersPageInfo.update_page_info,
|
||||
}
|
||||
|
||||
|
||||
# Check if all the page info is implemented in the mappings
|
||||
for t in [x for k, x in PageBases.__dict__.items() if not str(k).startswith("__")]:
|
||||
if t not in list(dict(page_infos).keys()):
|
||||
raise NotImplementedError(f"Page Info of : {t} is not implemented in mappings")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
from Events.Engine.abstract_class import DefaultClusterName, LanguageModels
|
||||
from .bases import KeyBases, cluster_name
|
||||
|
||||
|
||||
account_language_update_models = LanguageModels()
|
||||
account_language_update_models.COMPONENT = "Link"
|
||||
account_language_update_models.SITE_URL = f"/update?{DefaultClusterName}={cluster_name}"
|
||||
account_language_update_models.PREFIX_URL = (
|
||||
KeyBases.update_key
|
||||
)
|
||||
account_language_update_models.PAGE_INFO = {
|
||||
"en": {
|
||||
"page": "Update Account Records",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Hesap Kayıdı Güncelle",
|
||||
},
|
||||
}
|
||||
account_language_model_as_dict = account_language_update_models.as_dict()
|
||||
|
||||
|
||||
account_language_created_models = LanguageModels()
|
||||
account_language_created_models.COMPONENT = "Link"
|
||||
account_language_created_models.SITE_URL = f"/create?{DefaultClusterName}={cluster_name}"
|
||||
account_language_created_models.PREFIX_URL = (
|
||||
KeyBases.create_key
|
||||
)
|
||||
account_language_created_models.PAGE_INFO = {
|
||||
"en": {
|
||||
"page": "Create Account Records",
|
||||
},
|
||||
"tr": {"page": "Hesap Kayıdı Oluştur"},
|
||||
}
|
||||
account_language_created_models_as_dict = account_language_created_models.as_dict()
|
||||
|
||||
account_language_list_models = LanguageModels()
|
||||
account_language_list_models.COMPONENT = "Table"
|
||||
account_language_list_models.SITE_URL = f"/dashboard?{DefaultClusterName}={cluster_name}"
|
||||
account_language_list_models.PREFIX_URL = (
|
||||
KeyBases.list_key
|
||||
)
|
||||
account_language_list_models.PAGE_INFO = {
|
||||
"en": {
|
||||
"page": "List Account Records",
|
||||
},
|
||||
"tr": {
|
||||
"page": "Hesap Kayıtlarını Listele",
|
||||
},
|
||||
}
|
||||
|
||||
account_language_list_models_as_dict = account_language_list_models.as_dict()
|
||||
|
||||
account_language_create_form_models = LanguageModels()
|
||||
account_language_create_form_models.COMPONENT = "Form"
|
||||
account_language_create_form_models.SITE_URL = f"/create?{DefaultClusterName}={cluster_name}"
|
||||
account_language_create_form_models.PREFIX_URL = (
|
||||
KeyBases.create_key
|
||||
)
|
||||
account_language_create_form_models.PAGE_INFO = {
|
||||
"en": {"page": "List Account Records", "button:": "Create"},
|
||||
"tr": {"page": "Hesap Kayıtlarını Listele", "button:": "Oluştur"},
|
||||
}
|
||||
|
||||
account_language_create_models_as_dict = account_language_create_form_models.as_dict()
|
||||
|
||||
account_language_update_form_models = LanguageModels()
|
||||
account_language_update_form_models.COMPONENT = "Form"
|
||||
account_language_update_form_models.SITE_URL = f"/update?{DefaultClusterName}={cluster_name}"
|
||||
account_language_update_form_models.PREFIX_URL = (
|
||||
KeyBases.update_key
|
||||
)
|
||||
account_language_update_form_models.PAGE_INFO = {
|
||||
"en": {"page": "Update Account Records", "button:": "Update"},
|
||||
"tr": {"page": "Hesap Kayıdı Güncelle", "button:": "Güncelle"},
|
||||
}
|
||||
account_language_update_form_models_as_dict = (
|
||||
account_language_update_form_models.as_dict()
|
||||
)
|
||||
|
|
@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional, Callable
|
|||
from uuid import UUID
|
||||
|
||||
from ApiLayers.AllConfigs.Redis.configs import RedisCategoryKeys
|
||||
from Events.base_request_model import STATIC_PATH
|
||||
|
||||
|
||||
class PageComponent:
|
||||
|
|
@ -351,3 +352,22 @@ class CategoryCluster:
|
|||
if hasattr(self.PAGEINFO, "as_dict"):
|
||||
return {"prefix": self.PREFIX, **self.PAGEINFO.as_dict}
|
||||
return
|
||||
|
||||
|
||||
class LanguageModels:
|
||||
SITE_URL: str
|
||||
COMPONENT: str = "Table"
|
||||
PREFIX_URL: str = ""
|
||||
PAGE_INFO: dict
|
||||
STATIC_PATH: str = STATIC_PATH
|
||||
|
||||
def as_dict(self):
|
||||
return {
|
||||
"SITE_URL": f"/{self.STATIC_PATH}{self.SITE_URL}",
|
||||
"COMPONENT": self.COMPONENT,
|
||||
"PREFIX_URL": self.PREFIX_URL,
|
||||
"PAGE_INFO": self.PAGE_INFO,
|
||||
}
|
||||
|
||||
|
||||
DefaultClusterName = "site"
|
||||
|
|
@ -23,6 +23,7 @@ from Services.PostgresDb.Models.pagination import (
|
|||
|
||||
TokenDictType = Union[EmployeeTokenObject, OccupantTokenObject]
|
||||
|
||||
STATIC_PATH = "events"
|
||||
|
||||
class EndpointBaseRequestModel(BaseModel):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue