namespace MissionService.Domain.AggregatesModel.MissionAggregate;

using MissionService.Domain.SeedWork;

/// <summary>
/// EN: Repository interface for Mission aggregate
/// VI: Interface repository cho Mission aggregate
/// </summary>
public interface IMissionRepository : IRepository<Mission>
{
    /// <summary>
    /// EN: Add a new mission / VI: Thêm mission mới
    /// </summary>
    Mission Add(Mission mission);
    
    /// <summary>
    /// EN: Update an existing mission / VI: Cập nhật mission
    /// </summary>
    void Update(Mission mission);
    
    /// <summary>
    /// EN: Get mission by ID / VI: Lấy mission theo ID
    /// </summary>
    Task<Mission?> GetByIdAsync(Guid id, CancellationToken ct = default);
    
    /// <summary>
    /// EN: Get mission by code / VI: Lấy mission theo mã
    /// </summary>
    Task<Mission?> GetByCodeAsync(string code, CancellationToken ct = default);
    
    /// <summary>
    /// EN: Get all active missions / VI: Lấy tất cả missions đang hoạt động
    /// </summary>
    Task<IReadOnlyList<Mission>> GetActiveMissionsAsync(CancellationToken ct = default);
    
    /// <summary>
    /// EN: Get missions by type / VI: Lấy missions theo loại
    /// </summary>
    Task<IReadOnlyList<Mission>> GetByTypeAsync(MissionType type, CancellationToken ct = default);
    
    /// <summary>
    /// EN: Get missions by category / VI: Lấy missions theo danh mục
    /// </summary>
    Task<IReadOnlyList<Mission>> GetByCategoryAsync(MissionCategory category, CancellationToken ct = default);
}
