chore: 基线提交(重构前快照)
重构前保存现有 apps/ 结构基线,供后续各阶段回滚。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
# 城市表单验证
|
||||
class CityForm(BaseModel):
|
||||
id: Optional[int] = Field(None, description="城市ID")
|
||||
name: str = Field(..., min_length=1, max_length=150, description="城市名称")
|
||||
short_name: str = Field(..., min_length=1, max_length=150, description="城市简称")
|
||||
pinyin: str = Field(..., min_length=1, max_length=150, description="城市拼音")
|
||||
city_code: str = Field(..., min_length=1, max_length=6, description="城市区号")
|
||||
area_code: str = Field(..., min_length=1, max_length=20, description="行政编码")
|
||||
zip_code: str = Field(..., min_length=1, max_length=6, description="城市邮编")
|
||||
level: int = Field(..., ge=1, le=4, description="城市级别")
|
||||
lng: str = Field(..., min_length=1, max_length=150, description="城市经度")
|
||||
lat: str = Field(..., min_length=1, max_length=150, description="城市纬度")
|
||||
pid: Optional[int] = Field(None, description="上级ID")
|
||||
Reference in New Issue
Block a user