Validation_Suite/validation-suite/backend/mercury/app/schemas/auth.py

24 lines
424 B
Python

from __future__ import annotations
from pydantic import BaseModel, EmailStr
from app.models.user import UserRole
from app.schemas.common import EntityRead
class LoginRequest(BaseModel):
email: EmailStr
password: str
class TokenResponse(BaseModel):
access_token: str
token_type: str = "bearer"
class UserRead(EntityRead):
email: EmailStr
full_name: str
role: UserRole
is_active: bool