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

using BookingService.Domain.AggregatesModel.AppointmentAggregate;
using BookingService.Domain.SeedWork;

namespace BookingService.Infrastructure.Repositories;

/// <summary>
/// EN: Repository interface for managing Appointment aggregate persistence.
/// VI: Interface repository để quản lý persistence của aggregate Appointment.
/// </summary>
public interface IAppointmentRepository : IRepository<Appointment>
{
    /// <summary>
    /// EN: Add a new appointment.
    /// VI: Thêm cuộc hẹn mới.
    /// </summary>
    Appointment Add(Appointment appointment);

    /// <summary>
    /// EN: Update an existing appointment.
    /// VI: Cập nhật cuộc hẹn hiện có.
    /// </summary>
    void Update(Appointment appointment);

    /// <summary>
    /// EN: Get appointment by ID.
    /// VI: Lấy cuộc hẹn theo ID.
    /// </summary>
    Task<Appointment?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get appointments by shop ID.
    /// VI: Lấy danh sách cuộc hẹn theo shop ID.
    /// </summary>
    Task<List<Appointment>> GetByShopIdAsync(Guid shopId, CancellationToken cancellationToken = default);
}
