Added stuffies to reports, like images and coordinate based geolocation

This commit is contained in:
2026-04-06 23:48:19 -06:00
parent 4395a81815
commit f812d4a664
10 changed files with 147 additions and 14 deletions

View File

@@ -18,7 +18,8 @@ class CreateReport:
self.user_repo = user_repo
def execute(self, id_usuario: int, tipo_reporte: int, descripcion: str,
ubicacion: Optional[str] = None) -> Dict[str, Any]:
ubicacion: Optional[str] = None, lat: Optional[float] = None,
lng: Optional[float] = None, image_filename: Optional[str] = None) -> Dict[str, Any]:
"""
Sends a create report message to RabbitMQ.
Valida previamente:
@@ -68,6 +69,9 @@ class CreateReport:
tipo_reporte=tipo_reporte,
descripcion=descripcion.strip(),
ubicacion=ubicacion,
lat=lat,
lng=lng,
image_filename=image_filename,
visibilidad=50.0, # Visibilidad inicial neutral
fecha_creacion=fecha_creacion.isoformat()
)