修改
This commit is contained in:
parent
d541f02022
commit
fd8e55e91a
@ -52,7 +52,7 @@ class MerchantCreate(BaseModel):
|
|||||||
business_hours: str = Field(..., max_length=100)
|
business_hours: str = Field(..., max_length=100)
|
||||||
address: str = Field(..., max_length=200)
|
address: str = Field(..., max_length=200)
|
||||||
longitude: float = Field(..., ge=-180, le=180, description="经度")
|
longitude: float = Field(..., ge=-180, le=180, description="经度")
|
||||||
latitude: float = Field(..., ge=-180, le=180, description="纬度")
|
latitude: float = Field(..., ge=-90, le=90, description="纬度")
|
||||||
phone: str = Field(..., max_length=20, pattern=r'^\d+$')
|
phone: str = Field(..., max_length=20, pattern=r'^\d+$')
|
||||||
images: List[MerchantImage] = []
|
images: List[MerchantImage] = []
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ class MerchantUpdate(BaseModel):
|
|||||||
business_hours: Optional[str] = Field(None, max_length=100)
|
business_hours: Optional[str] = Field(None, max_length=100)
|
||||||
address: Optional[str] = Field(None, max_length=200)
|
address: Optional[str] = Field(None, max_length=200)
|
||||||
longitude: Optional[float] = Field(None, ge=-180, le=180, description="经度")
|
longitude: Optional[float] = Field(None, ge=-180, le=180, description="经度")
|
||||||
latitude: Optional[float] = Field(None, ge=-180, le=180, description="纬度")
|
latitude: Optional[float] = Field(None, ge=-90, le=90, description="纬度")
|
||||||
phone: Optional[str] = Field(None, max_length=20, pattern=r'^\d+$')
|
phone: Optional[str] = Field(None, max_length=20, pattern=r'^\d+$')
|
||||||
images: Optional[List[MerchantImage]] = None
|
images: Optional[List[MerchantImage]] = None
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user