Контракты
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Knot.Modules.Profiles.Contracts.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,
|
||||
IsPremium = false,
|
||||
CreatedAt = document.CreatedAt
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user