16 lines
376 B
Python
16 lines
376 B
Python
from typing import Annotated
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
Password = Annotated[str, Field(min_length=8, max_length=128)]
|
|
|
|
|
|
class UserCreateModel(BaseModel):
|
|
username: Annotated[str, Field(min_length=1, max_length=64)]
|
|
password: Password
|
|
captcha_token: str
|
|
|
|
|
|
class UserChangePasswordModel(BaseModel):
|
|
current_password: str
|
|
new_password: Password
|