13 lines
376 B
Python
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}
|