// EN: Repository interface for Table aggregate.
// VI: Interface repository cho aggregate Table.

using FnbEngine.Domain.SeedWork;

namespace FnbEngine.Domain.AggregatesModel.TableAggregate;

/// <summary>
/// EN: Repository interface for Table aggregate root.
/// VI: Interface repository cho aggregate root Table.
/// </summary>
public interface ITableRepository : IRepository<Table>
{
    /// <summary>
    /// EN: Add a new table.
    /// VI: Thêm bàn mới.
    /// </summary>
    Task<Table> AddAsync(Table table, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Update an existing table.
    /// VI: Cập nhật bàn hiện tại.
    /// </summary>
    void Update(Table table);

    /// <summary>
    /// EN: Get table by ID.
    /// VI: Lấy bàn theo ID.
    /// </summary>
    Task<Table?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get tables by shop ID.
    /// VI: Lấy danh sách bàn theo shop ID.
    /// </summary>
    Task<IEnumerable<Table>> GetByShopAsync(Guid shopId, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get table by shop ID and table number.
    /// VI: Lấy bàn theo shop ID và số bàn.
    /// </summary>
    Task<Table?> GetByNumberAsync(Guid shopId, string tableNumber, CancellationToken cancellationToken = default);
}
