- schema fin: fin.invoices + fin.invoice_items + fin.payments; totales con IVA, estados borrador→emitida→enviada→pagada, cobranza (pagos) y saldo automático - generar-factura-desde-embarque (toma conceptos de venta de la cotización) - ops.shipment_events: bitácora/hitos del embarque con secuencia por defecto según operación (importación/exportación) — cubre Diagrama 3 - subida de documentos a MinIO: POST /crm/uploads (multipart) + URL firmada - migración c4d5e6f7a8b9, routers/permisos (fin), seed del flujo hasta factura - 58 tests pytest en verde Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
27 lines
798 B
Python
27 lines
798 B
Python
"""
|
|
Router principal de API v1
|
|
"""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from .modules.core.router import router as core_router
|
|
from .modules.crm.router import router as crm_router
|
|
from .modules.ops.router import router as ops_router
|
|
from .modules.fin.router import router as fin_router
|
|
from .modules.example.routes import router as example_router
|
|
|
|
|
|
router = APIRouter()
|
|
|
|
router.include_router(core_router)
|
|
router.include_router(crm_router, prefix="/crm", tags=["crm"])
|
|
router.include_router(ops_router, prefix="/ops", tags=["ops"])
|
|
router.include_router(fin_router, prefix="/fin", tags=["fin"])
|
|
router.include_router(example_router, prefix="/example", tags=["example"])
|
|
|
|
|
|
@router.get("/status")
|
|
def status():
|
|
"""Health check de la API"""
|
|
return {"status": "ok", "version": "1.0.0", "api": "v1"}
|