Files
ToDoList/api/app/schemas/auth.py
2026-05-17 11:21:41 +08:00

16 lines
391 B
Python

from pydantic import BaseModel, Field
class LoginRequest(BaseModel):
password: str = Field(..., min_length=1, max_length=100)
class TokenResponse(BaseModel):
access_token: str
token_type: str = "bearer"
class ChangePasswordRequest(BaseModel):
old_password: str = Field(..., min_length=1, max_length=100)
new_password: str = Field(..., min_length=1, max_length=100)