Контракты

This commit is contained in:
Халимов Рустам
2026-03-29 23:39:17 +03:00
parent 22bc964f27
commit 0209802e9e
141 changed files with 1292 additions and 725 deletions
@@ -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
};
}
}