namespace ColaFlow.Modules.ProjectManagement.Domain.Repositories;

/// <summary>
/// Unit of Work pattern interface
/// Coordinates the work of multiple repositories and ensures transactional consistency
/// </summary>
public interface IUnitOfWork
{
    /// <summary>
    /// Saves all changes made in this unit of work to the database
    /// </summary>
    /// <param name="cancellationToken">Cancellation token</param>
    /// <returns>The number of entities written to the database</returns>
    Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
