schemas updated
This commit is contained in:
parent
ab76e972e3
commit
f21c92cb27
|
|
@ -1,10 +0,0 @@
|
||||||
from ErrorHandlers.ApiErrorHandlers.api_exc_handler import (
|
|
||||||
HTTPExceptionApiHandler,
|
|
||||||
HTTPExceptionApi,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"HTTPExceptionApiHandler",
|
|
||||||
"HTTPExceptionApi",
|
|
||||||
]
|
|
||||||
|
|
@ -1,11 +1,5 @@
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict
|
||||||
|
from ErrorHandlers.Exceptions.api_exc import HTTPExceptionApi
|
||||||
|
|
||||||
class HTTPExceptionApi(Exception):
|
|
||||||
|
|
||||||
def __init__(self, error_code: str, lang: str):
|
|
||||||
self.error_code = error_code
|
|
||||||
self.lang = lang
|
|
||||||
|
|
||||||
|
|
||||||
class HTTPExceptionApiHandler:
|
class HTTPExceptionApiHandler:
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
class HTTPExceptionApi(Exception):
|
||||||
|
|
||||||
|
def __init__(self, error_code: str, lang: str):
|
||||||
|
self.error_code = error_code
|
||||||
|
self.lang = lang
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
from ErrorHandlers.ErrorHandlers.api_exc_handler import (
|
||||||
|
HTTPExceptionApiHandler,
|
||||||
|
)
|
||||||
|
from ErrorHandlers.Exceptions.api_exc import (
|
||||||
|
HTTPExceptionApi,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"HTTPExceptionApiHandler",
|
||||||
|
"HTTPExceptionApi",
|
||||||
|
]
|
||||||
|
|
@ -21,8 +21,8 @@ from sqlalchemy.orm import Query
|
||||||
|
|
||||||
from ApiValidations.Request.base_validations import PydanticBaseModel
|
from ApiValidations.Request.base_validations import PydanticBaseModel
|
||||||
from ApiValidations.handler import BaseModelRegular
|
from ApiValidations.handler import BaseModelRegular
|
||||||
from Services.Postgres.Models.response import PostgresResponse
|
from Services.PostgresDb.Models.response import PostgresResponse
|
||||||
from ErrorHandlers.ApiErrorHandlers.api_exc_handler import HTTPExceptionApi
|
from ErrorHandlers.ErrorHandlers.api_exc_handler import HTTPExceptionApi
|
||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from typing import Any, Dict, Optional, Generator
|
from typing import Any, Dict, Optional, Generator
|
||||||
from fastapi import HTTPException, status
|
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ from sqlalchemy.orm import Query, Session
|
||||||
from sqlalchemy.sql.elements import BinaryExpression
|
from sqlalchemy.sql.elements import BinaryExpression
|
||||||
|
|
||||||
from ApiLibrary import system_arrow
|
from ApiLibrary import system_arrow
|
||||||
from ErrorHandlers.ApiErrorHandlers import HTTPExceptionApi
|
from ErrorHandlers.Exceptions.api_exc import HTTPExceptionApi
|
||||||
from Services.PostgresDb.Models.response import PostgresResponse
|
from Services.PostgresDb.Models.response import PostgresResponse
|
||||||
|
|
||||||
# Type variable for class methods returning self
|
# Type variable for class methods returning self
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ from typing import Optional, List
|
||||||
from sqlalchemy import String, Integer
|
from sqlalchemy import String, Integer
|
||||||
from sqlalchemy.orm import Mapped, mapped_column
|
from sqlalchemy.orm import Mapped, mapped_column
|
||||||
|
|
||||||
from Services.Postgres.Models.my_base_model import CrudCollection
|
from Services.PostgresDb import CrudCollection
|
||||||
from Services.Postgres.database import get_db
|
from Services.PostgresDb.database import get_db
|
||||||
|
|
||||||
|
|
||||||
# Example Model Definition
|
# Example Model Definition
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ from sqlalchemy_mixins.repr import ReprMixin
|
||||||
from sqlalchemy_mixins.smartquery import SmartQueryMixin
|
from sqlalchemy_mixins.smartquery import SmartQueryMixin
|
||||||
|
|
||||||
from ApiLibrary import DateTimeLocal, system_arrow
|
from ApiLibrary import DateTimeLocal, system_arrow
|
||||||
from Services.Postgres.database import Base
|
from Services.PostgresDb.database import Base
|
||||||
from Services.PostgresDb.Models.filter_functions import FilterAttributes
|
from Services.PostgresDb.Models.filter_functions import FilterAttributes
|
||||||
|
|
||||||
# Type variable for class methods returning self
|
# Type variable for class methods returning self
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,3 @@ class AccessToken(BaseModel):
|
||||||
def delimiter(self):
|
def delimiter(self):
|
||||||
return "*"
|
return "*"
|
||||||
|
|
||||||
|
|
||||||
# access_token_obj = AccessToken.from_dict({
|
|
||||||
# "accessToken": "token",
|
|
||||||
# "userUUID": "uuid"
|
|
||||||
# })
|
|
||||||
# access_token_obj.to_list()
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue