fix
This commit is contained in:
parent
91670ae2dc
commit
c5bc3b8e86
@ -59,7 +59,7 @@ class UserDB(Base):
|
|||||||
# Pydantic 模型
|
# Pydantic 模型
|
||||||
class UserLogin(BaseModel):
|
class UserLogin(BaseModel):
|
||||||
phone: str = Field(..., pattern="^1[3-9]\d{9}$")
|
phone: str = Field(..., pattern="^1[3-9]\d{9}$")
|
||||||
verify_code: str = Field(..., min_length=6, max_length=6)
|
verify_code: str = Field(..., min_length=4, max_length=6)
|
||||||
referral_code: Optional[str] = Field(None, min_length=6, max_length=6)
|
referral_code: Optional[str] = Field(None, min_length=6, max_length=6)
|
||||||
|
|
||||||
class UserInfo(BaseModel):
|
class UserInfo(BaseModel):
|
||||||
@ -114,7 +114,7 @@ class UserPasswordLogin(BaseModel):
|
|||||||
role: UserRole = Field(default=UserRole.DELIVERYMAN)
|
role: UserRole = Field(default=UserRole.DELIVERYMAN)
|
||||||
|
|
||||||
class ChangePasswordRequest(BaseModel):
|
class ChangePasswordRequest(BaseModel):
|
||||||
verify_code: str = Field(..., min_length=6, max_length=6)
|
verify_code: str = Field(..., min_length=4, max_length=6)
|
||||||
new_password: str = Field(..., min_length=6, max_length=20)
|
new_password: str = Field(..., min_length=6, max_length=20)
|
||||||
|
|
||||||
class UserUpdateRoles(BaseModel):
|
class UserUpdateRoles(BaseModel):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user