using Baya.Application.Models.Addresses;
using Baya.Application.Models.Common;
using Mediator;

namespace Baya.Application.Features.Addresses.Commands.CreateAddress;

/// <summary>
/// Creates a saved address for the signed-in customer. The street line, postal code and recipient contact
/// are encrypted at rest; coordinates are set from the <c>IGeocoder</c> seam. The first address (or one
/// created with <c>IsPrimary=true</c>) becomes the single primary. Tenancy is from the caller.
/// </summary>
public record CreateAddressCommand(
    string Title,
    long CityId,
    long? DistrictId,
    string AddressLine,
    string PostalCode,
    string RecipientName,
    string RecipientPhone,
    bool IsPrimary,
    decimal? Latitude = null,
    decimal? Longitude = null) : IRequest<OperationResult<CustomerAddressDto>>;
