using OmsorgCore.Domain.Entities;

namespace OmsorgCore.Application.Abstractions;

public interface ITimeEntryRepository
{
    Task<TimeEntry?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
    Task<(IReadOnlyList<TimeEntry> Items, int TotalCount)> GetPagedAsync(
        Guid? statusId,
        Guid? employeeId,
        Guid? orderId,
        int page,
        int pageSize,
        CancellationToken cancellationToken = default,
        Guid? restrictToEmployeeId = null);
    Task AddAsync(TimeEntry timeEntry, CancellationToken cancellationToken = default);
    Task UpdateAsync(TimeEntry timeEntry, CancellationToken cancellationToken = default);
    Task<bool> SoftDeleteAsync(Guid id, CancellationToken cancellationToken = default);
    Task<IReadOnlyList<TimeEntry>> GetDeletedAsync(string? search, CancellationToken cancellationToken = default);
    Task<bool> RestoreAsync(Guid id, CancellationToken cancellationToken = default);
    Task SaveChangesAsync(CancellationToken cancellationToken = default);
}
