events updated
This commit is contained in:
@@ -3,6 +3,7 @@ from typing import Union
|
||||
from fastapi.responses import JSONResponse
|
||||
from fastapi import status
|
||||
|
||||
from api_validations.validations_response.parts import BuildPartsListResponse
|
||||
from databases import (
|
||||
Build,
|
||||
BuildParts,
|
||||
@@ -24,7 +25,7 @@ class BuildingBuildPartsListEventMethods(MethodToEvent):
|
||||
__event_keys__ = {
|
||||
"b860e37a-e19b-4c45-9543-461241f7587c": "building_build_parts_list"
|
||||
}
|
||||
__event_validation__ = {"b860e37a-e19b-4c45-9543-461241f7587c": None}
|
||||
__event_validation__ = {"b860e37a-e19b-4c45-9543-461241f7587c": BuildPartsListResponse}
|
||||
|
||||
@classmethod
|
||||
def building_build_parts_list(
|
||||
@@ -45,6 +46,9 @@ class BuildingBuildPartsListEventMethods(MethodToEvent):
|
||||
completed=True,
|
||||
message="Building Parts Records are listed",
|
||||
result=records,
|
||||
cls_object=BuildParts,
|
||||
response_model=BuildPartsListResponse,
|
||||
filter_attributes=list_options,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -20,16 +20,21 @@ from api_validations.validations_request import (
|
||||
UpdateBuildLivingSpace,
|
||||
ListOptions,
|
||||
)
|
||||
from api_validations.validations_response.living_space import LivingSpaceListResponse
|
||||
from databases.sql_models.event.event import Services
|
||||
|
||||
|
||||
class BuildingLivingSpacesListEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "SELECT"
|
||||
event_description = ""
|
||||
event_category = ""
|
||||
__event_keys__ = {
|
||||
"36961d8a-cefa-46cc-9f7c-9d841d6351b6": "building_live_space_list",
|
||||
}
|
||||
__event_validation__ = {"36961d8a-cefa-46cc-9f7c-9d841d6351b6": None}
|
||||
__event_validation__ = {
|
||||
"36961d8a-cefa-46cc-9f7c-9d841d6351b6": LivingSpaceListResponse
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def building_live_space_list(
|
||||
@@ -100,6 +105,9 @@ class BuildingLivingSpacesListEventMethods(MethodToEvent):
|
||||
completed=True,
|
||||
message="Building Living Spaces are listed successfully",
|
||||
result=records,
|
||||
response_model=LivingSpaceListResponse,
|
||||
cls_object=BuildLivingSpace,
|
||||
filter_attributes=list_options,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user