20 lines
397 B
Python
20 lines
397 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
|
|
class UserResponse(BaseModel):
|
|
"""Modèle de réponse pour un utilisateur"""
|
|
|
|
id: str
|
|
email: str
|
|
nom: str
|
|
prenom: str
|
|
role: str
|
|
is_verified: bool
|
|
is_active: bool
|
|
created_at: str
|
|
last_login: Optional[str] = None
|
|
failed_login_attempts: int = 0
|
|
|
|
class Config:
|
|
from_attributes = True
|