using MediatR;

namespace IamService.API.Application.Queries.UserProfiles;

/// <summary>
/// EN: Query to get user profile by user ID.
/// VI: Query để lấy profile user theo ID user.
/// </summary>
public record GetUserProfileQuery(Guid UserId) : IRequest<UserProfileDto?>;

/// <summary>
/// EN: User profile DTO for query results.
/// VI: DTO profile user cho kết quả query.
/// </summary>
public record UserProfileDto(
    Guid Id,
    Guid UserId,
    string? Bio,
    string? AvatarUrl,
    string? Timezone,
    string? Locale,
    DateTime? DateOfBirth,
    PhoneNumberDto? PhoneNumber,
    AddressDto? Address,
    IEnumerable<ProfileAttributeDto> Attributes,
    DateTime CreatedAt,
    DateTime? UpdatedAt);

/// <summary>
/// EN: Phone number DTO.
/// VI: DTO số điện thoại.
/// </summary>
public record PhoneNumberDto(string CountryCode, string NationalNumber);

/// <summary>
/// EN: Address DTO.
/// VI: DTO địa chỉ.
/// </summary>
public record AddressDto(
    string? Street,
    string? Street2,
    string? City,
    string? State,
    string? PostalCode,
    string? Country);

/// <summary>
/// EN: Profile attribute DTO.
/// VI: DTO profile attribute.
/// </summary>
public record ProfileAttributeDto(
    string Key,
    string Value,
    string ValueType);
