260710_0
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""B02_ProjRegister 요청/응답 스키마."""
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class CreateProjectRequest(BaseModel):
|
||||
"""신규 프로젝트 생성 요청."""
|
||||
|
||||
name: str = Field(..., min_length=1, max_length=255)
|
||||
region: str = Field(..., min_length=1, max_length=100)
|
||||
road_type: str = Field(..., pattern="^(main|branch|fire|stream)$")
|
||||
project_year: int = Field(..., ge=2000, le=2100)
|
||||
estimated_length_m: float | None = Field(default=None, ge=0)
|
||||
memo: str | None = Field(default=None, max_length=1000)
|
||||
|
||||
|
||||
class CreateProjectResponse(BaseModel):
|
||||
"""신규 프로젝트 생성 응답."""
|
||||
|
||||
project_id: str
|
||||
name: str
|
||||
region: str | None
|
||||
road_type: str | None
|
||||
project_year: int | None
|
||||
estimated_length_m: float | None
|
||||
memo: str | None
|
||||
status: str
|
||||
storage_path: str
|
||||
created_at: str
|
||||
Reference in New Issue
Block a user