Структура

This commit is contained in:
Халимов Рустам
2026-03-30 00:09:12 +03:00
parent 0209802e9e
commit 89b2eeea6c
124 changed files with 623 additions and 599 deletions
@@ -1,6 +1,6 @@
using Knot.Shared.Kernel;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Modules.Profiles.Contracts.Application.DTOs;
using Knot.Contracts.Profiles.Domain;
using Knot.Contracts.Profiles.Application.DTOs;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Processing;
using System;
@@ -1,6 +1,6 @@
using Knot.Shared.Kernel;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Modules.Profiles.Contracts.Application.DTOs;
using Knot.Contracts.Profiles.Domain;
using Knot.Contracts.Profiles.Application.DTOs;
using System;
using System.IO;
using System.Threading;
@@ -1,6 +1,6 @@
using Knot.Shared.Kernel;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Modules.Profiles.Contracts.Application.DTOs;
using Knot.Contracts.Profiles.Domain;
using Knot.Contracts.Profiles.Application.DTOs;
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -1,17 +1,17 @@
using MediatR;
using MediatR;
using System.Threading;
using System.Threading.Tasks;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Contracts.Profiles.Domain;
using Knot.Modules.Profiles.Domain;
using Knot.Shared.Kernel.Events;
namespace Knot.Modules.Profiles.Application.Profiles.Integration;
/// <summary>
/// Îáðàáîò÷èê ñîáûòèÿ èç ìîäóëÿ Auth.
/// Ñîçäà¸ò ïóñòîé ïðîôèëü ïðè ðåãèñòðàöèè ïîëüçîâàòåëÿ.
/// Обработчик события из модуля Auth.
/// Создаёт пустой профиль при регистрации пользователя.
/// </summary>
internal class UserRegisteredDomainEventHandler : INotificationHandler<UserRegisteredDomainEvent>
public class UserRegisteredDomainEventHandler : INotificationHandler<UserRegisteredDomainEvent>
{
private readonly IProfileRepository _repository;
@@ -26,7 +26,7 @@ internal class UserRegisteredDomainEventHandler : INotificationHandler<UserRegis
if (profile != null)
return;
await _repository.CreateAsync(new Contracts.Application.DTOs.UserProfileDto
await _repository.CreateAsync(new Knot.Contracts.Profiles.Application.DTOs.UserProfileDto
{
UserId = notification.UserId,
Username = notification.Username,
@@ -1,6 +1,6 @@
using Knot.Shared.Kernel;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Modules.Profiles.Contracts.Application.DTOs;
using Knot.Contracts.Profiles.Domain;
using Knot.Contracts.Profiles.Application.DTOs;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
@@ -1,6 +1,6 @@
using Knot.Shared.Kernel;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Modules.Profiles.Contracts.Application.DTOs;
using Knot.Contracts.Profiles.Domain;
using Knot.Contracts.Profiles.Application.DTOs;
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -1,6 +1,6 @@
using Knot.Shared.Kernel;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Modules.Profiles.Contracts.Application.DTOs;
using Knot.Contracts.Profiles.Domain;
using Knot.Contracts.Profiles.Application.DTOs;
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -1,4 +1,4 @@
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Contracts.Profiles.Domain;
using Knot.Modules.Profiles.Infrastructure.Database;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@@ -1,7 +1,7 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Contracts.Profiles.Domain;
using Knot.Shared.Kernel.Storage;
namespace Knot.Modules.Profiles.Infrastructure.Database;
@@ -3,12 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Modules.Profiles.Contracts.Application.DTOs;
using Knot.Contracts.Profiles.Domain;
using Knot.Contracts.Profiles.Application.DTOs;
using Knot.Modules.Profiles.Domain;
using Knot.Modules.Profiles.Infrastructure.Mappings;
using Knot.Shared.Kernel;
using ProfilesErrors = Knot.Modules.Profiles.Contracts.Application.DTOs.ProfilesErrors;
using ProfilesErrors = Knot.Contracts.Profiles.Application.DTOs.ProfilesErrors;
using MongoDB.Bson;
using MongoDB.Driver;
@@ -1,6 +1,6 @@
using System.Threading;
using System.Threading.Tasks;
using Knot.Modules.Profiles.Contracts.Domain;
using Knot.Contracts.Profiles.Domain;
using Knot.Shared.Kernel;
namespace Knot.Modules.Profiles.Infrastructure.Database;
@@ -1,4 +1,4 @@
using Knot.Modules.Profiles.Contracts.Application.DTOs;
using Knot.Contracts.Profiles.Application.DTOs;
using Knot.Modules.Profiles.Domain;
namespace Knot.Modules.Profiles.Infrastructure.Mappings;
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
@@ -8,6 +8,8 @@
<ItemGroup>
<ProjectReference Include="..\..\Shared\Knot.Shared.Kernel\Knot.Shared.Kernel.csproj" />
<ProjectReference Include="..\..\Shared\Knot.Shared.Infrastructure\Knot.Shared.Infrastructure.csproj" />
<ProjectReference Include="..\..\Contracts\Profiles\Knot.Contracts.Profiles.csproj" />
</ItemGroup>
<ItemGroup>
@@ -19,18 +21,9 @@
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Shared\Knot.Shared.Kernel\Knot.Shared.Kernel.csproj" />
<ProjectReference Include="..\..\Shared\Knot.Shared.Infrastructure\Knot.Shared.Infrastructure.csproj" />
<ProjectReference Include="..\..\Contracts\Knot.Modules.Profiles.Contracts\Knot.Modules.Profiles.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Knot.Modules.Profiles.UnitTests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
</ItemGroup>
</Project>