feat: extract billing module with routes (Phase 3)

Create app/modules/billing/ directory structure with:
- definition.py: Module definition with features and menu items
- routes/admin.py: Admin billing routes with module access control
- routes/vendor.py: Vendor billing routes with module access control

Key changes:
- Billing module uses require_module_access("billing") dependency
- Admin router now includes billing module router instead of legacy
- Module registry imports billing_module from extracted location
- Routes have identical functionality but are now module-gated

Module structure pattern for future extractions:
  app/modules/{module}/
  ├── __init__.py
  ├── definition.py (ModuleDefinition + router getters)
  └── routes/
      ├── __init__.py
      ├── admin.py (require_module_access dependency)
      └── vendor.py (require_module_access dependency)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-25 21:54:42 +01:00
parent cd65a5992d
commit c614b7d74c
7 changed files with 699 additions and 26 deletions

View File

@@ -0,0 +1,12 @@
# app/modules/billing/routes/__init__.py
"""
Billing module route registration.
This module provides functions to register billing routes
with module-based access control.
"""
from app.modules.billing.routes.admin import admin_router
from app.modules.billing.routes.vendor import vendor_router
__all__ = ["admin_router", "vendor_router"]