refactor(M02): 일위대가 조합 남은 은퇴 — 갈라 내기 · 키 적기(use-combo) · 조합 만들기 · 지우기 · 알약 길 지움 · Branch.py 지움 · 시험은 저장소 함수 · 은퇴 길 404 · 405 로(39-1d)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rJwJMVL4EE31y77TB11AP
This commit is contained in:
2026-10-04 20:58:51 +09:00
co-authored by Claude Opus 5.5
parent a6d7851e83
commit 022a8d854d
9 changed files with 86 additions and 427 deletions
@@ -10,7 +10,6 @@ from typing import Any
from fastapi import APIRouter, HTTPException, Query
from pydantic import BaseModel
from M02_MasterTemplete import M02_MasterTemplete_Branch as branch
from M02_MasterTemplete import M02_MasterTemplete_Options as options
from M02_MasterTemplete import M02_MasterTemplete_Store as store
@@ -22,13 +21,6 @@ class SaveBody(BaseModel):
문서: Any
class BranchBody(BaseModel):
본뜬키: str
담은로직: list[dict[str, Any]]
이름: str = ""
판: str = "" # 집계표 판 — 주면 어긋날 때 409
class OptionsBody(BaseModel):
판: str = "" # 옵션 표시 표 판 — 어긋나면 409
표시: dict[str, Any] # {종류: {옵션 키: 참 · 거짓}} — 거짓만 남김
@@ -63,24 +55,6 @@ def post_structure(column: str) -> dict:
return _call(store.create_structure, column)
@router.post("/structures/{column}/combo")
def post_structure_combo(column: str, body: BranchBody) -> dict:
"""조합 갈라 내기 — 고친 담은 로직으로 새 UA(같은 로직 집합이면 있는 키) · 이 열만 가리킴."""
return _call(branch.branch_combo, column, body.본뜬키, body.담은로직, body.이름, body.판)
class UseComboBody(BaseModel):
종류: str # 일위대가
키: str
판: str = "" # 집계표 판 — 주면 어긋날 때 409
@router.post("/structures/{column}/use-combo")
def post_structure_use_combo(column: str, body: UseComboBody) -> dict:
"""있는 조합을 이 열에 씀 — 집계표 그 열 일위대가 키만 바꿈(조합은 그대로)."""
return _call(branch.use_combo, column, body.종류, body.키, body.판)
@router.get("/structure-options")
def get_structure_options() -> dict:
"""`{판, 표시, 종류}` — 표시 = 숨긴 것만 · 종류 = 옵션 있는 종류와 그 옵션."""