"""data_consume — 数据消费处理模块

模块结构:
  data_cleaner.py      — 数据清洗与预处理
  analytics_engine.py   — 实时/批处理分析引擎
  report_generator.py   — 可视化报表生成
  quality_monitor.py    — 数据质量监控
  task_scheduler.py     — 自动化任务调度
  data_security.py      — 安全与隐私保护

使用示例:
  from src.data_consume.analytics_engine import get_engine
  from src.data_consume.report_generator import get_generator
  from src.data_consume.task_scheduler import get_scheduler

  # 运行分析
  engine = get_engine()
  report = engine.run_batch_analysis(tenant_id="default")

  # 生成报表
  gen = get_generator()
  results = gen.generate_all(report=report)

  # 启动调度器
  sched = get_scheduler()
  sched.start(daemon=True)
"""

from src.data_consume.data_cleaner import DataCleaner, clean_trades, CleaningReport
from src.data_consume.analytics_engine import (
    AnalyticsEngine,
    BatchAnalyzer,
    RealTimeAnalyzer,
    PatternRecognizer,
    get_engine,
    RollingStats,
    BatchReport,
    MarketInsight,
)
from src.data_consume.report_generator import (
    ReportGenerator,
    DashboardGenerator,
    MarkdownReportGenerator,
    JSONExporter,
    CSVExporter,
    get_generator,
)
from src.data_consume.quality_monitor import (
    generate_quality_report,
    check_and_alert_quality,
    get_quality_score,
    get_quality_status,
    QualityReport,
)
from src.data_consume.task_scheduler import (
    TaskScheduler,
    get_scheduler,
    run_scheduler_daemon,
)
from src.data_consume.data_security import (
    AccessControl,
    DataSanitizer,
    SecurityMiddleware,
    RateLimiter,
    generate_security_report,
    get_access_control,
    get_security_middleware,
    verify_api_key,
    sanitize_output,
)

__all__ = [
    # Cleaner
    "DataCleaner",
    "clean_trades",
    "CleaningReport",
    # Analytics
    "AnalyticsEngine",
    "BatchAnalyzer",
    "RealTimeAnalyzer",
    "PatternRecognizer",
    "get_engine",
    "RollingStats",
    "BatchReport",
    "MarketInsight",
    # Reports
    "ReportGenerator",
    "DashboardGenerator",
    "MarkdownReportGenerator",
    "JSONExporter",
    "CSVExporter",
    "get_generator",
    # Quality
    "generate_quality_report",
    "check_and_alert_quality",
    "get_quality_score",
    "get_quality_status",
    "QualityReport",
    # Scheduler
    "TaskScheduler",
    "get_scheduler",
    "run_scheduler_daemon",
    # Security
    "AccessControl",
    "DataSanitizer",
    "SecurityMiddleware",
    "RateLimiter",
    "generate_security_report",
    "get_access_control",
    "get_security_middleware",
    "verify_api_key",
    "sanitize_output",
]