- Implemented service classes for PedimentoConfigParameters, PedimentoConfigSurcharges, PedimentoConfigUpdateRectification, PedimentoConfigUpdates, PedimentoCustomsOffices, PedimentoDates, PedimentoDecrementables, PedimentoIncrementables, PedimentoIndexes, PedimentoPayments, PedimentoRectificationDestination, PedimentoRectificationOrigin, PedimentoTransportMeans, and PedimentoValidation. - Each service class includes methods for CRUD operations: create, read, update, and delete. - Added a main router for the API v1, integrating various modules including authentication, tenants, licenses, and pedimentos. - Created models for PedimentoValidation with appropriate constraints and relationships.
27 lines
564 B
Python
27 lines
564 B
Python
"""
|
|
Router principal de API v1
|
|
Agrega todos los módulos de la aplicación
|
|
"""
|
|
from fastapi import APIRouter
|
|
|
|
# Importar routers de módulos
|
|
from .modules.a76.router import router as a76_router
|
|
from .modules.public.router import router as public_router
|
|
|
|
# Router principal
|
|
router = APIRouter()
|
|
|
|
# Registrar módulos
|
|
router.include_router(a76_router)
|
|
router.include_router(public_router)
|
|
|
|
# Health check
|
|
@router.get("/status")
|
|
def status():
|
|
"""Health check de la API"""
|
|
return {
|
|
"status": "ok",
|
|
"version": "1.0.0",
|
|
"api": "v1"
|
|
}
|