// EN: Command to add a branch to a shop.
// VI: Command để thêm chi nhánh vào shop.

using MediatR;

namespace MerchantService.API.Application.Commands.Shops;

/// <summary>
/// EN: Command to add a physical branch to a shop.
/// VI: Command để thêm chi nhánh vật lý vào shop.
/// </summary>
public record AddShopBranchCommand : IRequest<AddShopBranchResult>
{
    /// <summary>
    /// EN: Shop ID.
    /// VI: ID shop.
    /// </summary>
    public Guid ShopId { get; init; }
    
    /// <summary>
    /// EN: Branch name.
    /// VI: Tên chi nhánh.
    /// </summary>
    public string Name { get; init; } = null!;
    
    /// <summary>
    /// EN: Branch code (e.g., "HN01").
    /// VI: Mã chi nhánh (ví dụ: "HN01").
    /// </summary>
    public string? Code { get; init; }
    
    /// <summary>
    /// EN: Street address.
    /// VI: Địa chỉ đường phố.
    /// </summary>
    public string Street { get; init; } = null!;
    
    /// <summary>
    /// EN: Ward/Commune.
    /// VI: Phường/Xã.
    /// </summary>
    public string? Ward { get; init; }
    
    /// <summary>
    /// EN: District.
    /// VI: Quận/Huyện.
    /// </summary>
    public string District { get; init; } = null!;
    
    /// <summary>
    /// EN: City.
    /// VI: Thành phố.
    /// </summary>
    public string City { get; init; } = null!;
    
    /// <summary>
    /// EN: Province/State.
    /// VI: Tỉnh/Thành.
    /// </summary>
    public string? Province { get; init; }
    
    /// <summary>
    /// EN: Latitude coordinate.
    /// VI: Tọa độ vĩ độ.
    /// </summary>
    public double? Latitude { get; init; }
    
    /// <summary>
    /// EN: Longitude coordinate.
    /// VI: Tọa độ kinh độ.
    /// </summary>
    public double? Longitude { get; init; }
    
    /// <summary>
    /// EN: Branch phone number.
    /// VI: Số điện thoại chi nhánh.
    /// </summary>
    public string? Phone { get; init; }
}

/// <summary>
/// EN: Result of adding a branch.
/// VI: Kết quả thêm chi nhánh.
/// </summary>
public record AddShopBranchResult(
    Guid BranchId,
    string Name,
    string Address
);
