using Books.Api.EventFlow.ReadModels;

namespace Books.Api.EventFlow.Repositories;

public interface IJournalEntryDraftRepository
{
    /// <summary>
    /// Get a draft by its ID.
    /// </summary>
    Task<JournalEntryDraftReadModelDto?> GetByIdAsync(string id, CancellationToken cancellationToken = default);

    /// <summary>
    /// Get all active drafts for a company.
    /// </summary>
    Task<IReadOnlyList<JournalEntryDraftReadModelDto>> GetActiveByCompanyIdAsync(
        string companyId,
        CancellationToken cancellationToken = default);

    /// <summary>
    /// Get all drafts for a company (including posted and discarded).
    /// </summary>
    Task<IReadOnlyList<JournalEntryDraftReadModelDto>> GetByCompanyIdAsync(
        string companyId,
        CancellationToken cancellationToken = default);
}
