// EN: Command to register a new merchant.
// VI: Command để đăng ký merchant mới.

using MediatR;

namespace MerchantService.API.Application.Commands.Merchants;

/// <summary>
/// EN: Command to register a new merchant (shop owner).
/// VI: Command để đăng ký merchant mới (chủ shop).
/// </summary>
public record RegisterMerchantCommand : IRequest<RegisterMerchantResult>
{
    /// <summary>
    /// EN: User ID extracted from JWT claims by the controller.
    /// VI: User ID được lấy từ JWT claims bởi controller.
    /// </summary>
    public Guid UserId { get; init; }

    /// <summary>
    /// EN: Business/Company name.
    /// VI: Tên doanh nghiệp/công ty.
    /// </summary>
    public string BusinessName { get; init; } = null!;
    
    /// <summary>
    /// EN: Merchant type (Individual or Company).
    /// VI: Loại merchant (Individual hoặc Company).
    /// </summary>
    public string Type { get; init; } = "Individual";
    
    /// <summary>
    /// EN: Tax identification number.
    /// VI: Mã số thuế.
    /// </summary>
    public string? TaxId { get; init; }
    
    /// <summary>
    /// EN: Business license number.
    /// VI: Số giấy phép kinh doanh.
    /// </summary>
    public string? BusinessLicenseNumber { get; init; }
}

/// <summary>
/// EN: Result of merchant registration.
/// VI: Kết quả đăng ký merchant.
/// </summary>
public record RegisterMerchantResult(
    Guid MerchantId,
    string BusinessName,
    string Status
);
