feat: 初始提交

This commit is contained in:
anonymous
2025-10-21 09:38:26 +08:00
committed by t59688
parent 2965b8e28f
commit c9fc816fab
175 changed files with 23968 additions and 87 deletions

View File

@@ -0,0 +1,14 @@
from typing import Optional
from sqlalchemy import select
from .base import BaseRepository
from ..models import LLMConfig
class LLMConfigRepository(BaseRepository[LLMConfig]):
model = LLMConfig
async def get_by_user(self, user_id: int) -> Optional[LLMConfig]:
result = await self.session.execute(select(LLMConfig).where(LLMConfig.user_id == user_id))
return result.scalars().first()