Files
IBKRTrader/src/IBKRTrader.Modules.Accounting/Models/IngestRun.cs
T
RichardandClaude Opus 4.8 2a312ca035 R8: Accounting- + Supervisor-Modul + Core-Datenfundament (S-0)
Portierung der beiden fehlenden Grundbausteine aus PolytraderSharp (voller Ausbau).

Core S-0 (Datenfundament fuer Analyse/Forensik):
- core_decision_journal + core_order_events (+ ReasonCode/Decision/OrderEvent-Enums),
  IDecisionJournal/IOrderEventLog mit fehlertoleranten EF-Impls (Handel bricht nie).
- SignalId-Durchreichung TradeSignal -> ExecutionService -> core_trade_history;
  ExecutionService schreibt an jeder Verzweigung Journal/Order-Events.
- JSONL-Log-Sink (LogJson + Dual-Sink), pure Analytik: RealizedPnlEngine (FIFO),
  TradeAnalytics, DossierBuilder. Migration AddAnalysisFoundation.

Accounting-Modul (acc_): unabhaengiger IBKR-Kontoauszug (Activity Flex Query) hinter
Interfaces mit Offline-Null-Stubs -> append-only Ledger + Periodenabrechnung/BWA + FX
(USD/EUR) + CSV/PDF (PDFsharp/MigraDoc). Steuerschicht bewusst offen (Platzhalter-Tab).
Kein Handel. Migration InitialAccounting.

Supervisor-Modul (sup_): read-only OpenRouter-Agent (Function-Calling-Loop) + read-only
Tool-Registry (8 Tools) + Profile + Dossier-Browser + Counterfactual-Job (Stub) +
Tagesbericht/MCP-Light (opt-in). Migration InitialSupervisor.

Verdrahtung: Program.cs (beide Module + Icons), slnx/App/Tests-Referenzen,
provision-db.ps1, AppSettings-Sektionen, docs/konzepte, README.

Tests: 79 -> 117 gruen (FIFO/KPIs/Dossier/JSONL, Classifier/Engine/FX/Idempotenz,
OpenRouter/Registry/Agent/MCP, STA-Konstruktion beider neuen Fenster).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-31 09:25:18 +02:00

29 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace IBKRTrader.Modules.Accounting.Models;
/// <summary>
/// Protokoll eines Ingest-Laufs (Tabelle acc_ingest_runs): je Account ein Datensatz pro Abruf mit
/// Zeitraum, Ergebnis (neu/Duplikate) und Balance-Anker (Soll-Ist als Vollständigkeits-Signal).
/// </summary>
public class IngestRun
{
public long Id { get; set; }
public string AccountId { get; set; } = "";
public bool Backfill { get; set; }
public DateTime StartedAt { get; set; } = DateTime.UtcNow;
public DateTime? FinishedAt { get; set; }
public DateTime? FromTimestamp { get; set; }
public int NewEntries { get; set; }
public int DuplicateEntries { get; set; }
public bool Success { get; set; }
public string Message { get; set; } = "";
/// <summary>Vom Broker gemeldeter Kontosaldo (Basiswährung), falls verfügbar.</summary>
public decimal? BalanceAnchorBase { get; set; }
/// <summary>Σ NetBase des Ledgers (Buchhaltungs-Saldo).</summary>
public decimal? LedgerNetBase { get; set; }
/// <summary>Anker Ledger (≈ 0 = vollständig).</summary>
public decimal? BalanceDeltaBase { get; set; }
}