using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using PolyTraderSharp.Models;

namespace PolyTrader.Core.Persistence
{
    /// <summary>
    /// Entscheidungsjournal (core_decision_journal). Write darf den Trading-Pfad NIEMALS brechen –
    /// Implementierungen fangen Persistenzfehler ab (Log statt Exception).
    /// </summary>
    public interface IDecisionJournal
    {
        void Write(DecisionRecord record);
        List<DecisionRecord> Query(Expression<Func<DecisionRecord, bool>> predicate, int limit = 1000);
    }

    /// <summary>Order-Lifecycle-Log (core_order_events). Gleiche Robustheits-Garantie wie das Journal.</summary>
    public interface IOrderEventLog
    {
        void Write(OrderEventRecord record);
        List<OrderEventRecord> Query(Expression<Func<OrderEventRecord, bool>> predicate, int limit = 1000);
    }
}
