ems-core v1.0.0: Standard EMS platform core

Shared backend + frontend for multi-customer EMS deployments.
- 12 enterprise modules: quota, cost, charging, maintenance, analysis, etc.
- 120+ API endpoints, 37 database tables
- Customer config mechanism (CUSTOMER env var + YAML config)
- Collectors: Modbus TCP, MQTT, HTTP API, Sungrow iSolarCloud
- Frontend: React 19 + Ant Design + ECharts + Three.js
- Infrastructure: Redis cache, rate limiting, aggregation engine

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Du Wenbo
2026-04-04 18:14:11 +08:00
commit 92ec910a13
227 changed files with 39179 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
from app.models.user import User, Role, AuditLog
from app.models.device import Device, DeviceGroup, DeviceType
from app.models.energy import EnergyData, EnergyDailySummary, EnergyCategory
from app.models.alarm import AlarmRule, AlarmEvent
from app.models.carbon import (
CarbonEmission, EmissionFactor, CarbonTarget, CarbonReduction,
GreenCertificate, CarbonReport, CarbonBenchmark,
)
from app.models.report import ReportTemplate, ReportTask
from app.models.setting import SystemSetting
from app.models.charging import (
ChargingStation, ChargingPile, ChargingPriceStrategy, ChargingPriceParam,
ChargingOrder, OccupancyOrder, ChargingBrand, ChargingMerchant,
)
from app.models.quota import EnergyQuota, QuotaUsage
from app.models.pricing import ElectricityPricing, PricingPeriod
from app.models.maintenance import InspectionPlan, InspectionRecord, RepairOrder, DutySchedule
from app.models.management import Regulation, Standard, ProcessDoc, EmergencyPlan
from app.models.prediction import PredictionTask, PredictionResult, OptimizationSchedule
from app.models.energy_strategy import TouPricing, TouPricingPeriod, EnergyStrategy, StrategyExecution, MonthlyCostReport
from app.models.weather import WeatherData, WeatherConfig
from app.models.ai_ops import DeviceHealthScore, AnomalyDetection, DiagnosticReport, MaintenancePrediction, OpsInsight
__all__ = [
"User", "Role", "AuditLog",
"Device", "DeviceGroup", "DeviceType",
"EnergyData", "EnergyDailySummary", "EnergyCategory",
"AlarmRule", "AlarmEvent",
"CarbonEmission", "EmissionFactor", "CarbonTarget", "CarbonReduction",
"GreenCertificate", "CarbonReport", "CarbonBenchmark",
"ReportTemplate", "ReportTask",
"SystemSetting",
"ChargingStation", "ChargingPile", "ChargingPriceStrategy", "ChargingPriceParam",
"ChargingOrder", "OccupancyOrder", "ChargingBrand", "ChargingMerchant",
"EnergyQuota", "QuotaUsage",
"ElectricityPricing", "PricingPeriod",
"InspectionPlan", "InspectionRecord", "RepairOrder", "DutySchedule",
"Regulation", "Standard", "ProcessDoc", "EmergencyPlan",
"PredictionTask", "PredictionResult", "OptimizationSchedule",
"TouPricing", "TouPricingPeriod", "EnergyStrategy", "StrategyExecution", "MonthlyCostReport",
"WeatherData", "WeatherConfig",
"DeviceHealthScore", "AnomalyDetection", "DiagnosticReport", "MaintenancePrediction", "OpsInsight",
]