// EN: Query to get a list of categories.
// VI: Query để lấy danh sách danh mục.

using MediatR;
using CatalogService.API.Application.DTOs;

namespace CatalogService.API.Application.Queries;

/// <summary>
/// EN: Query to get categories by shop with hierarchical support.
/// VI: Query để lấy danh mục theo shop có hỗ trợ phân cấp.
/// </summary>
public record GetCategoriesQuery : IRequest<List<CategoryDto>>
{
    /// <summary>
    /// EN: Shop ID to filter categories.
    /// VI: ID shop để lọc danh mục.
    /// </summary>
    public Guid ShopId { get; init; }

    /// <summary>
    /// EN: Filter by parent ID (null = root categories).
    /// VI: Lọc theo ID cha (null = danh mục gốc).
    /// </summary>
    public Guid? ParentId { get; init; }
}
