schemas updated
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from datetime import datetime, timedelta
|
||||
from typing import List, Optional, Union
|
||||
from datetime import timedelta
|
||||
from typing import List, Union
|
||||
|
||||
from fastapi import HTTPException, status
|
||||
from sqlalchemy.orm import mapped_column, relationship, Mapped
|
||||
@@ -16,17 +16,17 @@ from sqlalchemy import (
|
||||
or_,
|
||||
)
|
||||
|
||||
from api_library.date_time_actions.date_functions import system_arrow
|
||||
from ApiLibrary.date_time_actions.date_functions import system_arrow
|
||||
from Services.PostgresDb import CrudCollection
|
||||
from databases.extensions.selector_classes import SelectActionWithEmployee
|
||||
from api_validations.validations_request import (
|
||||
from ApiValidations.Request import (
|
||||
InsertBuild,
|
||||
InsertBuildParts,
|
||||
InsertBuildLivingSpace,
|
||||
UpdateBuild,
|
||||
)
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from databases.language_models.building.build import (
|
||||
# from databases.extensions.selector_classes import SelectActionWithEmployee
|
||||
# from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from LanguageModels.Database.building.build import (
|
||||
BuildTypesLanguageModel,
|
||||
Part2EmployeeLanguageModel,
|
||||
BuildPartsLanguageModel,
|
||||
@@ -246,7 +246,7 @@ class Build(CrudCollection, SelectActionWithEmployee):
|
||||
|
||||
@classmethod
|
||||
def create_action(cls, data: InsertBuild, token):
|
||||
from databases import Addresses
|
||||
from Schemas import Addresses
|
||||
|
||||
data_dict = data.excluded_dump()
|
||||
data_dict["address_id"] = None
|
||||
@@ -280,7 +280,7 @@ class Build(CrudCollection, SelectActionWithEmployee):
|
||||
|
||||
@classmethod
|
||||
def update_action(cls, data: UpdateBuild, build_uu_id: str, token):
|
||||
from databases import Addresses
|
||||
from Schemas import Addresses
|
||||
|
||||
print("data_dict", data.dump())
|
||||
data_dict = data.excluded_dump()
|
||||
@@ -427,7 +427,7 @@ class BuildParts(CrudCollection):
|
||||
|
||||
@classmethod
|
||||
def create_action(cls, data: InsertBuildParts, token):
|
||||
from databases import ApiEnumDropdown
|
||||
from Schemas import ApiEnumDropdown
|
||||
|
||||
data_dict = data.dump()
|
||||
build_from_duty = Build.select_action(
|
||||
@@ -565,7 +565,7 @@ class BuildLivingSpace(CrudCollection):
|
||||
data: dict,
|
||||
token_dict: Union[EmployeeTokenObject, OccupantTokenObject],
|
||||
):
|
||||
from databases import Services, OccupantTypes
|
||||
from Schemas import Services, OccupantTypes
|
||||
from api_events.events.events.events_bind_modules import (
|
||||
ModulesBindOccupantEventMethods,
|
||||
)
|
||||
@@ -596,7 +596,7 @@ class BuildLivingSpace(CrudCollection):
|
||||
def find_living_from_customer_id(
|
||||
cls, customer_id, process_date, add_days: int = 32
|
||||
):
|
||||
from api_library.date_time_actions.date_functions import system_arrow
|
||||
from ApiLibrary.date_time_actions.date_functions import system_arrow
|
||||
|
||||
formatted_date = system_arrow.get(str(process_date))
|
||||
living_spaces = cls.filter_all(
|
||||
|
||||
Reference in New Issue
Block a user