using Domain.Entities; namespace Features.Users.Dtos; /// Converts user domain entities into API response models. public static class UserDtoMapper { /// Converts a user account into its public-profile representation. public static PublicUserProfileDto ToPublicProfileDto(this UserAccount user) { return new PublicUserProfileDto( UserAccountId : user.UserAccountId, Username : user.Username, FirstName : user.FirstName, LastName : user.LastName, Biography : user.UserProfile?.Biography ?? string.Empty, CreatedAt : user.CreatedAt ); } }