25 lines
691 B
C#
25 lines
691 B
C#
using Knot.Contracts.Profiles.Application.DTOs;
|
|
using Knot.Modules.Profiles.Domain;
|
|
|
|
namespace Knot.Modules.Profiles.Infrastructure.Mappings;
|
|
|
|
public static class ProfileMappings
|
|
{
|
|
public static UserProfileDto ToDto(this ProfileDocument document)
|
|
{
|
|
return new UserProfileDto
|
|
{
|
|
UserId = document.Id,
|
|
DisplayName = document.DisplayName,
|
|
Username = document.Username,
|
|
About = document.Bio,
|
|
Avatar = document.AvatarUrl,
|
|
IsBot = false,
|
|
LastSeen = null,
|
|
Birthday = document.Birthday,
|
|
IsPremium = false,
|
|
CreatedAt = document.CreatedAt
|
|
};
|
|
}
|
|
}
|