namespace CMSMicroservice.WebApi.Common.Mappings;

public class UserProfile : IRegister
{
    void IRegister.Register(TypeAdapterConfig config)
    {
        config.NewConfig<Application.UserCQ.Queries.GetAllUserByFilter.GetAllUserByFilterResponseModel,
                CMSMicroservice.Protobuf.Protos.User.GetAllUserByFilterResponseModel>()
            .Map(dest => dest.ParentId, src => src.NetworkParentId)
            .Map(dest => dest.DefaultAddress, src => src.DefaultAddress ?? string.Empty)
            .Map(dest => dest.DefaultPostalCode, src => src.DefaultPostalCode ?? string.Empty);
    }
}
