aiteamutils 0.2.3__tar.gz → 0.2.4__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/PKG-INFO +1 -1
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/base_repository.py +6 -5
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/base_service.py +2 -2
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/validators.py +7 -4
- aiteamutils-0.2.4/aiteamutils/version.py +2 -0
- aiteamutils-0.2.3/aiteamutils/version.py +0 -2
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/.gitignore +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/README.md +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/__init__.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/base_model.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/cache.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/config.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/database.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/dependencies.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/enums.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/exceptions.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/aiteamutils/security.py +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/pyproject.toml +0 -0
- {aiteamutils-0.2.3 → aiteamutils-0.2.4}/setup.py +0 -0
@@ -1,12 +1,13 @@
|
|
1
1
|
"""기본 레포지토리 모듈."""
|
2
|
-
from typing import TypeVar, Generic, Dict, Any, List, Optional, Type
|
3
|
-
from sqlalchemy.orm import DeclarativeBase
|
2
|
+
from typing import TypeVar, Generic, Dict, Any, List, Optional, Type, Union
|
3
|
+
from sqlalchemy.orm import DeclarativeBase, Load
|
4
4
|
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
5
5
|
from sqlalchemy import select, or_, and_
|
6
|
-
from .database import
|
6
|
+
from .database import DatabaseService
|
7
7
|
from .exceptions import CustomException, ErrorCode
|
8
8
|
from sqlalchemy.orm import joinedload
|
9
9
|
from sqlalchemy.sql import Select
|
10
|
+
from fastapi import Request
|
10
11
|
|
11
12
|
ModelType = TypeVar("ModelType", bound=DeclarativeBase)
|
12
13
|
|
@@ -14,10 +15,10 @@ class BaseRepository(Generic[ModelType]):
|
|
14
15
|
##################
|
15
16
|
# 1. 초기화 영역 #
|
16
17
|
##################
|
17
|
-
def __init__(self, db_service:
|
18
|
+
def __init__(self, db_service: DatabaseService, model: Type[ModelType]):
|
18
19
|
"""
|
19
20
|
Args:
|
20
|
-
db_service (
|
21
|
+
db_service (DatabaseService): 데이터베이스 서비스 인스턴스
|
21
22
|
model (Type[ModelType]): 모델 클래스
|
22
23
|
"""
|
23
24
|
self.db_service = db_service
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"""기본 서비스 모듈."""
|
2
2
|
from datetime import datetime
|
3
3
|
from typing import TypeVar, Generic, Dict, Any, List, Optional, Type, Union
|
4
|
-
from sqlalchemy.orm import DeclarativeBase
|
4
|
+
from sqlalchemy.orm import DeclarativeBase, Load
|
5
5
|
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
6
|
-
from .database import
|
6
|
+
from .database import DatabaseService
|
7
7
|
from .exceptions import CustomException, ErrorCode
|
8
8
|
from .base_repository import BaseRepository
|
9
9
|
from .security import hash_password
|
@@ -1,13 +1,16 @@
|
|
1
1
|
"""유효성 검사 관련 유틸리티 함수들을 모아둔 모듈입니다."""
|
2
2
|
|
3
|
-
from typing import Any, Optional,
|
3
|
+
from typing import Type, Dict, Any, Callable, TypeVar, Optional, List, Union
|
4
|
+
from functools import wraps
|
5
|
+
from sqlalchemy import Table
|
4
6
|
from sqlalchemy.ext.asyncio import AsyncSession
|
5
|
-
from
|
6
|
-
from
|
7
|
+
from fastapi import Request
|
8
|
+
from inspect import signature
|
9
|
+
from pydantic import BaseModel
|
7
10
|
import re
|
8
11
|
|
9
12
|
from .exceptions import ErrorCode, CustomException
|
10
|
-
from .database import
|
13
|
+
from .database import DatabaseService
|
11
14
|
from .base_model import Base
|
12
15
|
|
13
16
|
def validate_with(validator_func, unique_check=None, skip_if_none=False):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|