Spaces:
Sleeping
Sleeping
| """Modelo de dominio: Usuario (autenticación).""" | |
| from __future__ import annotations | |
| from datetime import datetime | |
| from pydantic import EmailStr, Field | |
| from app.models.common import MongoModel | |
| class User(MongoModel): | |
| """Usuario administrador del directorio. | |
| El campo ``hashed_password`` nunca debe exponerse en las respuestas | |
| de la API; para ello se utilizan los esquemas de :mod:`app.schemas.auth`. | |
| """ | |
| username: str = Field(min_length=3, max_length=50) | |
| email: EmailStr | |
| hashed_password: str | |
| is_active: bool = True | |
| is_superuser: bool = False | |
| fecha_creacion: datetime | |