Files
yaoyaoai/app/services/desktop_config.py
fengchuanhn@gmail.com 3db327d93b 22
2026-05-17 12:54:13 +08:00

13 lines
376 B
Python

"""desktop_configs 表:键值配置。"""
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from app.models.desktopConfig import DesktopConfig
async def list_all_as_map(db: AsyncSession) -> dict[str, str]:
result = await db.execute(select(DesktopConfig))
rows = result.scalars().all()
return {row.name: row.value for row in rows}