using MembershipService.Domain.SeedWork;

namespace MembershipService.Domain.AggregatesModel.LevelAggregate;

/// <summary>
/// EN: Repository interface for LevelDefinition aggregate.
/// VI: Interface repository cho LevelDefinition aggregate.
/// </summary>
public interface ILevelDefinitionRepository : IRepository<LevelDefinition>
{
    /// <summary>
    /// EN: Get level definition by ID.
    /// VI: Lấy level definition theo ID.
    /// </summary>
    Task<LevelDefinition?> GetAsync(Guid id);

    /// <summary>
    /// EN: Get level definition by level number.
    /// VI: Lấy level definition theo số thứ tự level.
    /// </summary>
    Task<LevelDefinition?> GetByLevelNumberAsync(int levelNumber);

    /// <summary>
    /// EN: Get level definition with benefits.
    /// VI: Lấy level definition kèm benefits.
    /// </summary>
    Task<LevelDefinition?> GetWithBenefitsAsync(Guid id);

    /// <summary>
    /// EN: Get all active level definitions ordered by level number.
    /// VI: Lấy tất cả level definitions đang active, sắp xếp theo số thứ tự.
    /// </summary>
    Task<IReadOnlyList<LevelDefinition>> GetAllActiveAsync();

    /// <summary>
    /// EN: Get all level definitions (including inactive).
    /// VI: Lấy tất cả level definitions (bao gồm cả inactive).
    /// </summary>
    Task<IReadOnlyList<LevelDefinition>> GetAllAsync();

    /// <summary>
    /// EN: Check if level number already exists.
    /// VI: Kiểm tra xem số thứ tự level đã tồn tại chưa.
    /// </summary>
    Task<bool> ExistsByLevelNumberAsync(int levelNumber);

    /// <summary>
    /// EN: Add new level definition.
    /// VI: Thêm level definition mới.
    /// </summary>
    LevelDefinition Add(LevelDefinition levelDefinition);

    /// <summary>
    /// EN: Update level definition.
    /// VI: Cập nhật level definition.
    /// </summary>
    void Update(LevelDefinition levelDefinition);
}
