From 7accaea1e7ee9eb109f89422ea822b4aec956999 Mon Sep 17 00:00:00 2001 From: Matteo Giustini Date: Mon, 25 May 2026 15:53:35 +0200 Subject: [PATCH] Schema base autenticazione --- backend/app/schemas/auth.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 backend/app/schemas/auth.py diff --git a/backend/app/schemas/auth.py b/backend/app/schemas/auth.py new file mode 100644 index 0000000..c308856 --- /dev/null +++ b/backend/app/schemas/auth.py @@ -0,0 +1,29 @@ +from pydantic import BaseModel, EmailStr + + +class LoginRequest(BaseModel): + email: EmailStr + password: str + + +class TokenResponse(BaseModel): + access_token: str + refresh_token: str + token_type: str = "bearer" + + +class RefreshRequest(BaseModel): + refresh_token: str + + +class UserOut(BaseModel): + id: int + email: str + full_name: str + role: str + group_id: int | None + is_active: bool + notify_email: bool + notify_push: bool + + model_config = {"from_attributes": True}