61 lines
1.5 KiB
Python
61 lines
1.5 KiB
Python
"""B06 종횡단 조회·확정 응답 검증 모델."""
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class SectionRegenerateRequest(BaseModel):
|
|
"""표시 옵션의 횡단 반폭 변경에 따른 종횡단 재생성 요청."""
|
|
|
|
cross_half_width_m: float = Field(..., gt=0)
|
|
|
|
|
|
class SectionConfirmResponse(BaseModel):
|
|
"""종횡단 확정 결과."""
|
|
|
|
status: str = "success"
|
|
project_id: str
|
|
route_id: int
|
|
confirmed: bool = True
|
|
|
|
|
|
class SectionOptionDefaults(BaseModel):
|
|
"""config에서 읽은 종횡단 생성 기본 옵션."""
|
|
|
|
station_interval_m: float
|
|
cross_half_width_m: float
|
|
cross_sample_interval_m: float
|
|
long_sample_interval_m: float
|
|
vertical_exaggeration: float
|
|
|
|
|
|
class SectionContextResponse(BaseModel):
|
|
"""B06 진입 시 필요한 확정 경로 컨텍스트와 기본 옵션."""
|
|
|
|
project_id: str
|
|
route_id: int | None = None
|
|
filter_key: str | None = None
|
|
method: str | None = None
|
|
smooth: bool | None = None
|
|
crs_epsg: int | None = None
|
|
defaults: SectionOptionDefaults
|
|
|
|
|
|
class SectionSummaryResponse(BaseModel):
|
|
"""종횡단 요약 조회 결과."""
|
|
|
|
status: str = "success"
|
|
project_id: str
|
|
route_id: int
|
|
longitudinal: dict[str, Any] | None = None
|
|
length_m: float | None = None
|
|
cross_section_count: int = 0
|
|
|
|
|
|
class SectionDetailResponse(BaseModel):
|
|
"""종단·횡단 SVG 렌더링에 필요한 원시 샘플 데이터."""
|
|
|
|
longitudinal: dict[str, Any]
|
|
cross_sections: list[dict[str, Any]]
|