base logic

This commit is contained in:
IluaAir
2025-07-06 11:58:45 +03:00
parent 817a799ef5
commit 4de11f4149
23 changed files with 149 additions and 17 deletions

View File

@@ -0,0 +1,16 @@
from typing import Annotated, AsyncGenerator
from fastapi import Depends
from sqlalchemy.ext.asyncio import AsyncSession
from src.core.database import async_session_maker
async def get_db() -> AsyncGenerator[AsyncSession, None]:
async with async_session_maker as db:
yield db
sessionDep = Annotated[AsyncSession, Depends(get_db)]