횡단설계(B06) 다음을 상세설계 → 수량산출 → 설계도서 순으로 재배열하고, 폴더 번호가 흐름과 일치하도록 이름을 맞바꾼다. - B08_DesignDetail → B07_DesignDetail, B07_Quantity → B08_Quantity (파일 접두어·식별자·라우트·locale 키 전량 스왑) - STAGE_KEYS 4=DESIGN_DETAIL, 5=QUANTITY 스왑 + 라우터 stage 리터럴 교체 - CAD 마운트 /b08-cad → /b07-cad (main.py·vite proxy·iframe URL), openwebcad Toolbar 라벨 B07로 수정 후 재빌드 - 유지: openwebcad postMessage 프로토콜 aislo:b08:*·패키지명(내부 식별자) - 기존 프로젝트 storage 폴더 rename + project_manifest 갱신, DB project_workflow_stages stage_no 4↔5 행 스왑 완료 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
71 lines
2.0 KiB
Python
71 lines
2.0 KiB
Python
"""B07 상세 설계 도면 목록·단건 응답 모델."""
|
|
|
|
from typing import Any, Literal
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class DesignDrawingItem(BaseModel):
|
|
"""B06 확정 산출물에서 노출하는 도면 메타데이터."""
|
|
|
|
id: str
|
|
kind: Literal["longitudinal", "cross"]
|
|
label: str
|
|
chainage_m: float | None = None
|
|
confirmed: bool = False
|
|
|
|
|
|
class DesignDrawingListResponse(BaseModel):
|
|
"""B07 진입 시 캐시할 경량 도면 목록."""
|
|
|
|
status: str = "success"
|
|
project_id: str
|
|
route_id: int
|
|
drawings: list[DesignDrawingItem]
|
|
|
|
|
|
class DesignDrawingResponse(BaseModel):
|
|
"""openwebcad 브리지로 전달할 단일 CAD 도면."""
|
|
|
|
status: str = "success"
|
|
project_id: str
|
|
route_id: int
|
|
id: str
|
|
kind: Literal["longitudinal", "cross"]
|
|
label: str
|
|
drawing: dict[str, Any]
|
|
confirmed: bool = False
|
|
# 횡단도 편집용 수량 산출표 값 (미산정 항목은 null). 종단도는 None.
|
|
quantity_table: dict[str, float | None] | None = None
|
|
# B06에서 지정한 잠정 설계(지반유형·단면유형·절성토 단면적). 횡단도만, 없으면 None.
|
|
design: dict[str, Any] | None = None
|
|
|
|
|
|
class DesignDrawingConfirmRequest(BaseModel):
|
|
"""CAD 앱에서 직렬화한 현재 편집 도면."""
|
|
|
|
drawing: dict[str, Any]
|
|
# 사용자가 편집한 수량 산출표 값 (횡단도 확정 시 영구 저장).
|
|
quantity_table: dict[str, Any] | None = None
|
|
|
|
|
|
class DesignDrawingConfirmResponse(BaseModel):
|
|
"""도면별 확정 및 B07 전체 완료 상태."""
|
|
|
|
status: str = "success"
|
|
project_id: str
|
|
id: str
|
|
confirmed: bool
|
|
all_confirmed: bool
|
|
# 횡단도 확정 시 재계산된 확정 설계(status=confirmed). 종단도·재계산 불가 시 None.
|
|
design: dict[str, Any] | None = None
|
|
|
|
|
|
class DesignDrawingInvalidateResponse(BaseModel):
|
|
"""확정 도면 변경에 따른 상태 롤백 결과."""
|
|
|
|
status: str = "success"
|
|
project_id: str
|
|
id: str
|
|
confirmed: bool = False
|