Changes committed

This commit is contained in:
2026-06-01 21:49:53 +05:30
parent 8537c653c1
commit 3163bb213e
387 changed files with 21940 additions and 107 deletions

View File

@@ -0,0 +1,43 @@
from __future__ import annotations
from pydantic import BaseModel, EmailStr, Field
from app.schemas.common import BaseSchema
class LoginRequest(BaseModel):
"""Login credentials."""
username: str = Field(..., min_length=3, max_length=150)
password: str = Field(..., min_length=8, max_length=128)
class RegisterRequest(BaseModel):
"""User registration payload."""
username: str = Field(..., min_length=3, max_length=150)
email: EmailStr
password: str = Field(..., min_length=8, max_length=128)
full_name: str | None = Field(None, max_length=255)
class TokenResponse(BaseSchema):
"""JWT token pair response."""
access_token: str
refresh_token: str
token_type: str = "bearer"
expires_in: int
class RefreshTokenRequest(BaseModel):
"""Refresh token request payload."""
refresh_token: str
class ChangePasswordRequest(BaseModel):
"""Change password payload."""
current_password: str = Field(..., min_length=8, max_length=128)
new_password: str = Field(..., min_length=8, max_length=128)