[FEAT] (사용자 로직): 인증 서비스 로직 구현 중

v0.1.1 (2025-11-13)
- 사용자 관련 인증 서비스 로직 구현 중
This commit is contained in:
2025-11-13 17:29:22 +09:00
parent 422c0638fd
commit ae2766cff5
16 changed files with 553 additions and 3 deletions

View File

@@ -0,0 +1,31 @@
"""
기본 레파지토리 추상 클래스
"""
from abc import ABC, abstractmethod
from typing import TypeVar, Generic, Optional, List, Type
from sqlalchemy.exc import SQLAlchemyError
from extensions import db, custom_logger
import settings
# Generic type for model entitles
T = TypeVar('T')
logger = custom_logger(f"{settings.LOG_PREFIX}_repository")
class BaseRepository(ABC, Generic[T]):
"""
기본직인 CRUD 제공
"""
@property
@abstractmethod
def model(self) -> Type[T]:
"""레파지토리 반환"""
pass
@property
def session(self):
"""현재 DB 세션 가져오기"""
return db.session