This commit is contained in:
admin
2025-12-22 17:30:32 +09:00
parent 87fa1aaa1f
commit 001b7bf08f
12 changed files with 1380 additions and 506 deletions

View File

@@ -0,0 +1,23 @@
from fastapi import APIRouter
from app.core.database import get_connection
router = APIRouter(prefix="/accounts", tags=["科目"])
@router.get("", summary="科目一覧取得")
def get_accounts():
"""
科目マスタ一覧を返す
"""
with get_connection() as conn, conn.cursor() as cur:
cur.execute("""
SELECT
account_id,
account_code,
account_name,
account_type
FROM accounts
ORDER BY account_code
""")
rows = cur.fetchall()
return rows