using MediatR;
using System.ComponentModel.DataAnnotations;

namespace TakeoutSaaS.Application.App.Merchants.Commands;

/// <summary>
/// 调整类目排序。
/// </summary>
public sealed record ReorderMerchantCategoriesCommand(
    [property: Required, MinLength(1)] IReadOnlyList<MerchantCategoryOrderItem> Items) : IRequest<bool>;

/// <summary>
/// 类目排序条目。
/// </summary>
public sealed record MerchantCategoryOrderItem(
    [property: Required] long CategoryId,
    [property: Range(-1000, 100000)] int DisplayOrder);
