#nullable enable
using Baya.Application.Models.Common;
using Baya.Application.Models.PartnerCenters;
using Mediator;

namespace Baya.Application.Features.PartnerCenters.Commands.CreatePartnerCenter;

/// <summary>
/// Registers a licensed partner center (admin-only). <see cref="SettlementIban"/> is required when
/// <see cref="IsMerchantOfRecord"/> is set and is encrypted at rest before persisting (never plaintext);
/// <see cref="CommissionRate"/> is the center's own cut (0–1), separate from <c>platform_fee_rate</c>. The
/// center is created inactive — <c>VerifyPartnerCenter</c> records the licensing approval and activates it.
/// </summary>
public record CreatePartnerCenterCommand(
    string Name,
    string? LegalEntityType,
    string MohEstablishmentPermitNo,
    int? TechnicalDirectorNurseUserId,
    string? TechnicalDirectorLicenseNo,
    string? EnamadCode,
    string? SettlementIban,
    bool IsMerchantOfRecord,
    decimal? CommissionRate,
    int AdminUserId) : IRequest<OperationResult<PartnerCenterDetailDto>>;
