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>
2026-04-04 18:14:11 +08:00
|
|
|
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
|
fix(models): add alembic migration 009 for missing tables (v1.4.1)
Migration adds tables that existed in models/ but were never
included in alembic history:
- ai_ops: device_health_scores, anomaly_detections, diagnostic_reports,
maintenance_predictions, ops_insights
- energy_strategy: tou_pricing, tou_pricing_periods, energy_strategies,
strategy_executions, monthly_cost_reports
- weather: weather_data, weather_config
- prediction: prediction_tasks, prediction_results, optimization_schedules
Without this migration, fresh deploys would 500 on these endpoints:
- /api/v1/ai-ops/health, /ai-ops/dashboard
- /api/v1/strategy/pricing
- /api/v1/prediction/forecast
- /api/v1/weather/current
Discovered during Z-Park demo deployment on xie_openclaw1.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:47:34 +08:00
|
|
|
from app.models.meter import MeterReading
|
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>
2026-04-04 18:14:11 +08:00
|
|
|
|
|
|
|
|
__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",
|
fix(models): add alembic migration 009 for missing tables (v1.4.1)
Migration adds tables that existed in models/ but were never
included in alembic history:
- ai_ops: device_health_scores, anomaly_detections, diagnostic_reports,
maintenance_predictions, ops_insights
- energy_strategy: tou_pricing, tou_pricing_periods, energy_strategies,
strategy_executions, monthly_cost_reports
- weather: weather_data, weather_config
- prediction: prediction_tasks, prediction_results, optimization_schedules
Without this migration, fresh deploys would 500 on these endpoints:
- /api/v1/ai-ops/health, /ai-ops/dashboard
- /api/v1/strategy/pricing
- /api/v1/prediction/forecast
- /api/v1/weather/current
Discovered during Z-Park demo deployment on xie_openclaw1.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:47:34 +08:00
|
|
|
"MeterReading",
|
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>
2026-04-04 18:14:11 +08:00
|
|
|
]
|