Files
tianpu-ems/backend/app/api/router.py
Du Wenbo 02c4698b59 feat: multi-customer architecture + Z-Park support + Gitea migration scripts
Multi-customer config system:
- CUSTOMER env var selects customer (tianpu/zpark)
- customers/tianpu/config.yaml — Tianpu branding, collectors, features
- customers/zpark/config.yaml — Z-Park branding, Sungrow collector
- GET /api/v1/branding endpoint for customer-specific branding
- main.py loads customer config for app title, CORS, logging
- Collector manager filters by customer's enabled collectors

Z-Park (中关村医疗器械园) support:
- Sungrow iSolarCloud API collector (sungrow_collector.py)
- Z-Park device definitions (10 inverters, 8 combiner boxes, 22+ buildings)
- Z-Park TOU pricing config (Beijing 2026 rates)
- Z-Park seed script (seed_zpark.py)

Gitea migration scripts (Mac Studio → labmac3):
- 5 migration scripts + README in scripts/gitea-migration/
- Creates 3-repo structure: ems-core, tp-ems, zpark-ems

Version: v1.0.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 16:23:33 +08:00

29 lines
1.3 KiB
Python

from fastapi import APIRouter
from app.api.v1 import auth, users, devices, energy, monitoring, alarms, reports, carbon, dashboard, collectors, websocket, audit, settings, charging, quota, cost, maintenance, management, prediction, energy_strategy, weather, ai_ops, branding
api_router = APIRouter(prefix="/api/v1")
api_router.include_router(auth.router)
api_router.include_router(users.router)
api_router.include_router(devices.router)
api_router.include_router(energy.router)
api_router.include_router(monitoring.router)
api_router.include_router(alarms.router)
api_router.include_router(reports.router)
api_router.include_router(carbon.router)
api_router.include_router(dashboard.router)
api_router.include_router(collectors.router)
api_router.include_router(websocket.router)
api_router.include_router(audit.router)
api_router.include_router(settings.router)
api_router.include_router(charging.router)
api_router.include_router(quota.router)
api_router.include_router(cost.router)
api_router.include_router(maintenance.router)
api_router.include_router(management.router)
api_router.include_router(prediction.router)
api_router.include_router(energy_strategy.router)
api_router.include_router(weather.router)
api_router.include_router(ai_ops.router)
api_router.include_router(branding.router)