Очистка мусора
This commit is contained in:
@@ -7,25 +7,25 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{C8E42992-5E42-0C2B-DBFE-AA848D06431C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vortex.Shared.Kernel", "src\Shared\Vortex.Shared.Kernel\Vortex.Shared.Kernel.csproj", "{C829F859-FF48-4025-BF22-8E63672D113C}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Knot.Shared.Kernel", "src\Shared\Knot.Shared.Kernel\Knot.Shared.Kernel.csproj", "{C829F859-FF48-4025-BF22-8E63672D113C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vortex.Shared.Infrastructure", "src\Shared\Vortex.Shared.Infrastructure\Vortex.Shared.Infrastructure.csproj", "{6C13E9A4-234C-4BF1-A145-F1BBA2AC56CB}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Knot.Shared.Infrastructure", "src\Shared\Knot.Shared.Infrastructure\Knot.Shared.Infrastructure.csproj", "{6C13E9A4-234C-4BF1-A145-F1BBA2AC56CB}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{EC447DCF-ABFA-6E24-52A5-D7FD48A5C558}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Identity", "Identity", "{0EC62A1A-9858-3A60-8A0C-FC9AACFA2EC7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vortex.Modules.Identity", "src\Modules\Identity\Vortex.Modules.Identity.csproj", "{5BB2F421-C4C4-40A1-8D6E-FEBB79AE7C98}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Knot.Modules.Identity", "src\Modules\Identity\Knot.Modules.Identity.csproj", "{5BB2F421-C4C4-40A1-8D6E-FEBB79AE7C98}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chats", "Chats", "{B4154CE3-9153-E2B0-0515-138FFCE32938}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vortex.Modules.Chats", "src\Modules\Chats\Vortex.Modules.Chats.csproj", "{695CC919-E321-4DC0-8D70-C631C51624E1}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Knot.Modules.Chats", "src\Modules\Chats\Knot.Modules.Chats.csproj", "{695CC919-E321-4DC0-8D70-C631C51624E1}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vortex.Modules.Identity.UnitTests", "tests\Vortex.Modules.Identity.UnitTests\Vortex.Modules.Identity.UnitTests.csproj", "{AB2F334E-DD7C-4314-93B9-941AFC6B2ACD}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Knot.Modules.Identity.UnitTests", "tests\Knot.Modules.Identity.UnitTests\Knot.Modules.Identity.UnitTests.csproj", "{AB2F334E-DD7C-4314-93B9-941AFC6B2ACD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vortex.Modules.Chats.UnitTests", "tests\Vortex.Modules.Chats.UnitTests\Vortex.Modules.Chats.UnitTests.csproj", "{F48A3E3A-EEBB-43AA-81AB-7DD7FE5F29B4}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Knot.Modules.Chats.UnitTests", "tests\Knot.Modules.Chats.UnitTests\Knot.Modules.Chats.UnitTests.csproj", "{F48A3E3A-EEBB-43AA-81AB-7DD7FE5F29B4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
+6
-6
@@ -1,13 +1,13 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Vortex.Modules.Identity.Application.Users.Register;
|
||||
using Vortex.Modules.Identity.Application.Users.Login;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Application.Users.Register;
|
||||
using Knot.Modules.Identity.Application.Users.Login;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Host.Controllers;
|
||||
namespace Host.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
+10
-10
@@ -2,20 +2,20 @@ using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Vortex.Modules.Chats.Application.Chats.Create;
|
||||
using Vortex.Modules.Chats.Application.Messages.Send;
|
||||
using Vortex.Modules.Chats.Application.Chats.GetOrCreateFavorites;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Application.Chats.Create;
|
||||
using Knot.Modules.Chats.Application.Messages.Send;
|
||||
using Knot.Modules.Chats.Application.Chats.GetOrCreateFavorites;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.Processing;
|
||||
|
||||
namespace Vortex.Host.Controllers;
|
||||
namespace Host.Controllers;
|
||||
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
|
||||
namespace Vortex.Host.Controllers;
|
||||
namespace Host.Controllers;
|
||||
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
+9
-9
@@ -1,15 +1,15 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Chats.Application.Messages.Send;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Messages.Send;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Vortex.Host.Controllers;
|
||||
namespace Host.Controllers;
|
||||
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
@@ -39,7 +39,7 @@ public sealed class MessagesController : ControllerBase
|
||||
var userIds = messages.Select(m => m.SenderId).ToList();
|
||||
userIds.AddRange(messages.Where(m => m.ForwardedFromId.HasValue).Select(m => m.ForwardedFromId!.Value));
|
||||
|
||||
var senders = new Dictionary<Guid, Vortex.Modules.Identity.Domain.User>();
|
||||
var senders = new Dictionary<Guid, Knot.Modules.Identity.Domain.User>();
|
||||
foreach (var id in userIds.Distinct())
|
||||
{
|
||||
var user = await _userRepository.GetByIdAsync(id, ct);
|
||||
@@ -137,7 +137,7 @@ public sealed class MessagesController : ControllerBase
|
||||
var userIds = messages.Select(m => m.SenderId).ToList();
|
||||
userIds.AddRange(messages.Where(m => m.ForwardedFromId.HasValue).Select(m => m.ForwardedFromId!.Value));
|
||||
|
||||
var senders = new Dictionary<Guid, Vortex.Modules.Identity.Domain.User>();
|
||||
var senders = new Dictionary<Guid, Knot.Modules.Identity.Domain.User>();
|
||||
foreach (var id in userIds.Distinct())
|
||||
{
|
||||
var user = await _userRepository.GetByIdAsync(id, ct);
|
||||
@@ -283,7 +283,7 @@ public sealed class MessagesController : ControllerBase
|
||||
public async Task<IActionResult> SendMessage(Guid chatId, [FromBody] SendMessageRequest request)
|
||||
{
|
||||
var attachments = request.Attachments?.Select(a =>
|
||||
new Vortex.Modules.Chats.Application.Messages.Send.AttachmentRequest(a.Type, a.Url, a.FileName, a.FileSize)).ToList();
|
||||
new Knot.Modules.Chats.Application.Messages.Send.AttachmentRequest(a.Type, a.Url, a.FileName, a.FileSize)).ToList();
|
||||
|
||||
var command = new SendMessageCommand(
|
||||
chatId,
|
||||
+11
-11
@@ -2,16 +2,16 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediatR;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Modules.Chats.Application.Messages.Send;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Application.Messages.Send;
|
||||
|
||||
namespace Vortex.Host.Controllers;
|
||||
namespace Host.Controllers;
|
||||
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
@@ -23,7 +23,7 @@ public sealed class StoriesController : ControllerBase
|
||||
private readonly IUserRepository _userRepository;
|
||||
private readonly IChatRepository _chatRepository;
|
||||
private readonly ISender _sender;
|
||||
private readonly IHubContext<Vortex.Modules.Chats.Infrastructure.SignalR.ChatHub> _hubContext;
|
||||
private readonly IHubContext<Knot.Modules.Chats.Infrastructure.SignalR.ChatHub> _hubContext;
|
||||
private readonly IMessageRepository _messageRepository;
|
||||
private readonly ILogger<StoriesController> _logger;
|
||||
|
||||
@@ -34,7 +34,7 @@ public sealed class StoriesController : ControllerBase
|
||||
IChatRepository chatRepository,
|
||||
IMessageRepository messageRepository,
|
||||
ISender sender,
|
||||
IHubContext<Vortex.Modules.Chats.Infrastructure.SignalR.ChatHub> hubContext,
|
||||
IHubContext<Knot.Modules.Chats.Infrastructure.SignalR.ChatHub> hubContext,
|
||||
ILogger<StoriesController> logger)
|
||||
{
|
||||
_context = context;
|
||||
@@ -359,7 +359,7 @@ public sealed class StoriesController : ControllerBase
|
||||
if (lastStoryMessage != null)
|
||||
{
|
||||
// If message already exists for this story, add a reaction to it
|
||||
var addReactionCommand = new Vortex.Modules.Chats.Application.Messages.React.AddReactionCommand(
|
||||
var addReactionCommand = new Knot.Modules.Chats.Application.Messages.React.AddReactionCommand(
|
||||
lastStoryMessage.Id, _userContext.UserId, request.Emoji, chatId);
|
||||
await _sender.Send(addReactionCommand, ct);
|
||||
}
|
||||
@@ -532,7 +532,7 @@ public sealed class StoriesController : ControllerBase
|
||||
|
||||
if (personalChat != null) return personalChat.Id;
|
||||
|
||||
var command = new Vortex.Modules.Chats.Application.Chats.Create.CreateChatCommand(string.Empty, ChatType.Personal, new List<Guid> { userId1, userId2 });
|
||||
var command = new Knot.Modules.Chats.Application.Chats.Create.CreateChatCommand(string.Empty, ChatType.Personal, new List<Guid> { userId1, userId2 });
|
||||
var result = await _sender.Send(command, ct);
|
||||
return result.Value;
|
||||
}
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.Processing;
|
||||
|
||||
namespace Vortex.Host.Controllers;
|
||||
namespace Host.Controllers;
|
||||
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace Vortex.Host.Controllers;
|
||||
namespace Host.Controllers;
|
||||
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
+3
-3
@@ -25,9 +25,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Modules\Identity\Vortex.Modules.Identity.csproj" />
|
||||
<ProjectReference Include="..\Modules\Chats\Vortex.Modules.Chats.csproj" />
|
||||
<ProjectReference Include="..\Shared\Vortex.Shared.Infrastructure\Vortex.Shared.Infrastructure.csproj" />
|
||||
<ProjectReference Include="..\Modules\Identity\Knot.Modules.Identity.csproj" />
|
||||
<ProjectReference Include="..\Modules\Chats\Knot.Modules.Chats.csproj" />
|
||||
<ProjectReference Include="..\Shared\Knot.Shared.Infrastructure\Knot.Shared.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
@Host_HostAddress = http://localhost:5059
|
||||
|
||||
GET {{Host_HostAddress}}/weatherforecast/
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
@@ -1,9 +1,9 @@
|
||||
using Vortex.Shared.Infrastructure;
|
||||
using Vortex.Modules.Identity;
|
||||
using Vortex.Modules.Chats;
|
||||
using Vortex.Modules.Chats.Infrastructure.SignalR;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Shared.Infrastructure;
|
||||
using Knot.Modules.Identity;
|
||||
using Knot.Modules.Chats;
|
||||
using Knot.Modules.Chats.Infrastructure.SignalR;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
@@ -135,7 +135,7 @@ using (var scope = app.Services.CreateScope())
|
||||
}
|
||||
|
||||
// Настройка конвейера запросов
|
||||
app.UseMiddleware<Vortex.Shared.Infrastructure.Middleware.ExceptionHandlingMiddleware>();
|
||||
app.UseMiddleware<Knot.Shared.Infrastructure.Middleware.ExceptionHandlingMiddleware>();
|
||||
|
||||
app.UseCors();
|
||||
|
||||
+4
-4
@@ -7,12 +7,12 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Database": "Host=localhost;Port=5432;Database=vortex_db;Username=vortex;Password=vortex_pass"
|
||||
"Database": "Host=localhost;Port=5432;Database=knot_db;Username=knot;Password=knot_pass"
|
||||
},
|
||||
"Jwt": {
|
||||
"Secret": "vortex_super_secret_key_1234567890_vortex",
|
||||
"Issuer": "Vortex",
|
||||
"Audience": "VortexUsers",
|
||||
"Secret": "knot_super_secret_key_1234567890_knot",
|
||||
"Issuer": "Knot",
|
||||
"Audience": "KnotUsers",
|
||||
"ExpiryInMinutes": 1440
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Application.Abstractions;
|
||||
namespace Knot.Modules.Chats.Application.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// Unit of Work специфичный для модуля Chats.
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
|
||||
namespace Vortex.Modules.Chats.Application.Chats.Create;
|
||||
namespace Knot.Modules.Chats.Application.Chats.Create;
|
||||
|
||||
/// <summary>
|
||||
/// Команда для создания чата.
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
|
||||
namespace Vortex.Modules.Chats.Application.Chats.GetOrCreateFavorites;
|
||||
namespace Knot.Modules.Chats.Application.Chats.GetOrCreateFavorites;
|
||||
|
||||
public sealed record GetOrCreateFavoritesCommand(Guid UserId) : ICommand<Guid>;
|
||||
|
||||
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using global::Vortex.Modules.Chats.Domain;
|
||||
using global::Vortex.Modules.Chats.Infrastructure.SignalR;
|
||||
using global::Vortex.Shared.Kernel;
|
||||
using global::Vortex.Modules.Chats.Application.Abstractions;
|
||||
using global::Knot.Modules.Chats.Domain;
|
||||
using global::Knot.Modules.Chats.Infrastructure.SignalR;
|
||||
using global::Knot.Shared.Kernel;
|
||||
using global::Knot.Modules.Chats.Application.Abstractions;
|
||||
|
||||
namespace Vortex.Modules.Chats.Application.Messages.Delete;
|
||||
namespace Knot.Modules.Chats.Application.Messages.Delete;
|
||||
|
||||
public sealed record DeleteMessagesCommand(
|
||||
Guid ChatId,
|
||||
@@ -29,7 +29,7 @@ public sealed class DeleteMessagesCommandHandler : ICommandHandler<DeleteMessage
|
||||
_hubContext = hubContext;
|
||||
}
|
||||
|
||||
public async Task<global::Vortex.Shared.Kernel.Result> Handle(DeleteMessagesCommand request, CancellationToken cancellationToken)
|
||||
public async Task<global::Knot.Shared.Kernel.Result> Handle(DeleteMessagesCommand request, CancellationToken cancellationToken)
|
||||
{
|
||||
foreach (var id in request.MessageIds)
|
||||
{
|
||||
@@ -71,6 +71,6 @@ public sealed class DeleteMessagesCommandHandler : ICommandHandler<DeleteMessage
|
||||
});
|
||||
}
|
||||
|
||||
return global::Vortex.Shared.Kernel.Result.Success();
|
||||
return global::Knot.Shared.Kernel.Result.Success();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Modules.Chats.Infrastructure.SignalR;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Infrastructure.SignalR;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Application.Messages.React;
|
||||
namespace Knot.Modules.Chats.Application.Messages.React;
|
||||
|
||||
public sealed record AddReactionCommand(
|
||||
Guid MessageId,
|
||||
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Modules.Chats.Infrastructure.SignalR;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Infrastructure.SignalR;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Application.Messages.React;
|
||||
namespace Knot.Modules.Chats.Application.Messages.React;
|
||||
|
||||
public sealed record RemoveReactionCommand(
|
||||
Guid MessageId,
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
using MediatR;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
|
||||
namespace Vortex.Modules.Chats.Application.Messages.Read;
|
||||
namespace Knot.Modules.Chats.Application.Messages.Read;
|
||||
|
||||
public sealed record ReadMessagesCommand(Guid ChatId, Guid UserId, List<Guid> MessageIds) : ICommand;
|
||||
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
|
||||
namespace Vortex.Modules.Chats.Application.Messages.Send;
|
||||
namespace Knot.Modules.Chats.Application.Messages.Send;
|
||||
|
||||
/// <summary>
|
||||
/// Команда для отправки сообщения в чат.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Vortex.Modules.Chats;
|
||||
namespace Knot.Modules.Chats;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
|
||||
namespace Vortex.Modules.Chats;
|
||||
namespace Knot.Modules.Chats;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Domain;
|
||||
namespace Knot.Modules.Chats.Domain;
|
||||
|
||||
public sealed record ChatCreatedDomainEvent(Chat Chat) : IDomainEvent;
|
||||
public sealed record ChatMemberAddedDomainEvent(Guid ChatId, Guid UserId) : IDomainEvent;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
|
||||
namespace Vortex.Modules.Chats.Domain;
|
||||
namespace Knot.Modules.Chats.Domain;
|
||||
|
||||
public interface IChatRepository
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
|
||||
namespace Vortex.Modules.Chats.Domain;
|
||||
namespace Knot.Modules.Chats.Domain;
|
||||
|
||||
public interface IMessageRepository
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Domain;
|
||||
namespace Knot.Modules.Chats.Domain;
|
||||
|
||||
/// <summary>
|
||||
/// Доменное событие: сообщение отправлено.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Domain;
|
||||
namespace Knot.Modules.Chats.Domain;
|
||||
|
||||
public sealed class ReadReceipt : Entity<Guid>
|
||||
{
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Modules.Chats.Infrastructure.SignalR;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Infrastructure.SignalR;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Handlers;
|
||||
namespace Knot.Modules.Chats.Infrastructure.Handlers;
|
||||
|
||||
/// <summary>
|
||||
/// Обработчик доменного события создания чата.
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Modules.Chats.Infrastructure.SignalR;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Infrastructure.SignalR;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Handlers;
|
||||
namespace Knot.Modules.Chats.Infrastructure.Handlers;
|
||||
|
||||
/// <summary>
|
||||
/// Обработчик доменного события отправки сообщения.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
public sealed class ChatRepository : IChatRepository
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||
using Vortex.Modules.Chats.Application.Abstractions;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Abstractions;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
/// <summary>
|
||||
/// Контекст базы данных для модуля чатов.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
public sealed class MessageRepository : IMessageRepository
|
||||
{
|
||||
|
||||
+8
-8
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260311180825_InitialChats")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -89,9 +89,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -127,9 +127,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitialChats : Migration
|
||||
|
||||
+12
-12
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260311215929_UpdateChatModel")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -89,7 +89,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -112,9 +112,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -150,9 +150,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -188,16 +188,16 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("ReadBy");
|
||||
});
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdateChatModel : Migration
|
||||
|
||||
+12
-12
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260312094130_AddForwardedFromToMessages")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -92,7 +92,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -115,9 +115,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -153,9 +153,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -191,16 +191,16 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("ReadBy");
|
||||
});
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddForwardedFromToMessages : Migration
|
||||
|
||||
+13
-13
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260312100324_AddReactionsToMessages")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -92,7 +92,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -115,9 +115,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -153,9 +153,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -188,7 +188,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
.HasForeignKey("MessageId");
|
||||
});
|
||||
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Reaction", "Reactions", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Reaction", "Reactions", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -220,16 +220,16 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Reactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("ReadBy");
|
||||
});
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddReactionsToMessages : Migration
|
||||
|
||||
+13
-13
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260312174910_UpdateChatsSchema")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -97,7 +97,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -120,9 +120,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -158,9 +158,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -193,7 +193,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
.HasForeignKey("MessageId");
|
||||
});
|
||||
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Reaction", "Reactions", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Reaction", "Reactions", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -225,16 +225,16 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Reactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("ReadBy");
|
||||
});
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdateChatsSchema : Migration
|
||||
|
||||
+15
-15
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260312204842_SupportPinningAndMuting")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -97,7 +97,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -121,7 +121,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("MessageReactions", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -144,9 +144,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -185,9 +185,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("MessageId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -221,25 +221,25 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("Reactions")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("Reactions");
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SupportPinningAndMuting : Migration
|
||||
|
||||
+15
-15
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260313183634_AddStoryIdToMessages")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -100,7 +100,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -124,7 +124,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("MessageReactions", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -147,9 +147,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -188,9 +188,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("MessageId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -224,25 +224,25 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("Reactions")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("Reactions");
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddStoryIdToMessages : Migration
|
||||
|
||||
+15
-15
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260313201532_AddStoryMediaInfoToMessages")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -106,7 +106,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -130,7 +130,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("MessageReactions", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -153,9 +153,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -194,9 +194,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("MessageId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -230,25 +230,25 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("Reactions")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("Reactions");
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddStoryMediaInfoToMessages : Migration
|
||||
|
||||
+15
-15
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
[Migration("20260313204219_AddChatDescription")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -53,7 +53,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -109,7 +109,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -133,7 +133,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("MessageReactions", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -156,9 +156,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -197,9 +197,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("MessageId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -233,25 +233,25 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("Reactions")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("Reactions");
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddChatDescription : Migration
|
||||
|
||||
+15
-15
@@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Chats.Infrastructure.Persistence;
|
||||
using Knot.Modules.Chats.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(ChatsDbContext))]
|
||||
partial class ChatsDbContextModelSnapshot : ModelSnapshot
|
||||
@@ -23,7 +23,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -50,7 +50,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Chats", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -106,7 +106,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Messages", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -130,7 +130,7 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("MessageReactions", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -153,9 +153,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("ReadReceipts", "chats");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Chat", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Chat", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.ChatMember", "Members", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -194,9 +194,9 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Members");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.OwnsMany("Vortex.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
b.OwnsMany("Knot.Modules.Chats.Domain.Media", "Media", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("MessageId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -230,25 +230,25 @@ namespace Vortex.Modules.Chats.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Reaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Reaction", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("Reactions")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.ReadReceipt", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Chats.Domain.Message", null)
|
||||
b.HasOne("Knot.Modules.Chats.Domain.Message", null)
|
||||
.WithMany("ReadBy")
|
||||
.HasForeignKey("MessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Chats.Domain.Message", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Chats.Domain.Message", b =>
|
||||
{
|
||||
b.Navigation("Reactions");
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ using MediatR;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Vortex.Modules.Chats.Application.Messages.Send;
|
||||
using Vortex.Modules.Chats.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Chats.Application.Messages.Send;
|
||||
using Knot.Modules.Chats.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Chats.Infrastructure.SignalR;
|
||||
namespace Knot.Modules.Chats.Infrastructure.SignalR;
|
||||
|
||||
/// <summary>
|
||||
/// Хаб SignalR для обработки сообщений и WebRTC сигналинга в реальном времени.
|
||||
@@ -115,7 +115,7 @@ public sealed class ChatHub : Hub
|
||||
|
||||
if (parsedIds.Any())
|
||||
{
|
||||
var command = new Vortex.Modules.Chats.Application.Messages.Read.ReadMessagesCommand(
|
||||
var command = new Knot.Modules.Chats.Application.Messages.Read.ReadMessagesCommand(
|
||||
request.ChatId, _userContext.UserId, parsedIds);
|
||||
await _sender.Send(command);
|
||||
}
|
||||
@@ -139,7 +139,7 @@ public sealed class ChatHub : Hub
|
||||
|
||||
if (parsedIds.Any())
|
||||
{
|
||||
var command = new Vortex.Modules.Chats.Application.Messages.Delete.DeleteMessagesCommand(
|
||||
var command = new Knot.Modules.Chats.Application.Messages.Delete.DeleteMessagesCommand(
|
||||
request.ChatId, _userContext.UserId, parsedIds, request.DeleteForAll);
|
||||
await _sender.Send(command);
|
||||
}
|
||||
@@ -179,7 +179,7 @@ public sealed class ChatHub : Hub
|
||||
request.MessageId, request.ChatId, request.Emoji, _userContext.UserId);
|
||||
|
||||
|
||||
var command = new Vortex.Modules.Chats.Application.Messages.React.AddReactionCommand(
|
||||
var command = new Knot.Modules.Chats.Application.Messages.React.AddReactionCommand(
|
||||
request.MessageId, _userContext.UserId, request.Emoji, request.ChatId);
|
||||
var result = await _sender.Send(command);
|
||||
if (result.IsFailure)
|
||||
@@ -200,7 +200,7 @@ public sealed class ChatHub : Hub
|
||||
request.MessageId, request.ChatId, request.Emoji, _userContext.UserId);
|
||||
|
||||
|
||||
var command = new Vortex.Modules.Chats.Application.Messages.React.RemoveReactionCommand(
|
||||
var command = new Knot.Modules.Chats.Application.Messages.React.RemoveReactionCommand(
|
||||
request.MessageId, _userContext.UserId, request.Emoji, request.ChatId);
|
||||
var result = await _sender.Send(command);
|
||||
if (result.IsFailure)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\Vortex.Shared.Kernel\Vortex.Shared.Kernel.csproj" />
|
||||
<ProjectReference Include="..\..\Shared\Knot.Shared.Kernel\Knot.Shared.Kernel.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity.Application.Abstractions;
|
||||
namespace Knot.Modules.Identity.Application.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// Unit of Work специфичный для модуля Identity.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
|
||||
namespace Vortex.Modules.Identity.Application.Abstractions;
|
||||
namespace Knot.Modules.Identity.Application.Abstractions;
|
||||
|
||||
public interface IJwtTokenProvider
|
||||
{
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
using BCrypt.Net;
|
||||
|
||||
namespace Vortex.Modules.Identity.Application.Users.Login;
|
||||
namespace Knot.Modules.Identity.Application.Users.Login;
|
||||
|
||||
/// <summary>
|
||||
/// Команда для входа пользователя. Возвращает JWT токен.
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
using BCrypt.Net;
|
||||
|
||||
namespace Vortex.Modules.Identity.Application.Users.Register;
|
||||
namespace Knot.Modules.Identity.Application.Users.Register;
|
||||
|
||||
/// <summary>
|
||||
/// Команда для регистрации нового пользователя.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Vortex.Modules.Identity;
|
||||
namespace Knot.Modules.Identity;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Vortex.Modules.Identity.Infrastructure.Authentication;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Infrastructure.Authentication;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity;
|
||||
namespace Knot.Modules.Identity;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
@@ -28,7 +28,7 @@ public static class DependencyInjection
|
||||
services.AddScoped<IIdentityUnitOfWork>(sp => sp.GetRequiredService<IdentityDbContext>());
|
||||
services.AddScoped<IUserRepository, UserRepository>();
|
||||
services.AddScoped<IJwtTokenProvider, JwtTokenProvider>();
|
||||
services.AddScoped<IUserDisplayNameProvider, Vortex.Modules.Identity.Infrastructure.Services.UserDisplayNameProvider>();
|
||||
services.AddScoped<IUserDisplayNameProvider, Knot.Modules.Identity.Infrastructure.Services.UserDisplayNameProvider>();
|
||||
|
||||
// Регистрация MediatR для этого модуля
|
||||
services.AddMediatR(config =>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity.Domain;
|
||||
namespace Knot.Modules.Identity.Domain;
|
||||
|
||||
public enum FriendshipStatus
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
|
||||
namespace Vortex.Modules.Identity.Domain;
|
||||
namespace Knot.Modules.Identity.Domain;
|
||||
|
||||
/// <summary>
|
||||
/// Интерфейс репозитория для работы с пользователями.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity.Domain;
|
||||
namespace Knot.Modules.Identity.Domain;
|
||||
|
||||
public class Story : Entity<Guid>
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity.Domain;
|
||||
namespace Knot.Modules.Identity.Domain;
|
||||
|
||||
public sealed class StoryReaction : Entity<Guid>
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity.Domain;
|
||||
namespace Knot.Modules.Identity.Domain;
|
||||
|
||||
public sealed class StoryReply : Entity<Guid>
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity.Domain;
|
||||
namespace Knot.Modules.Identity.Domain;
|
||||
|
||||
public sealed class StoryViewer : Entity<Guid>
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity.Domain;
|
||||
namespace Knot.Modules.Identity.Domain;
|
||||
|
||||
/// <summary>
|
||||
/// Сущность пользователя в контексте идентификации (Identity).
|
||||
|
||||
+3
-3
@@ -3,10 +3,10 @@ using System.Security.Claims;
|
||||
using System.Text;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Authentication;
|
||||
namespace Knot.Modules.Identity.Infrastructure.Authentication;
|
||||
|
||||
public sealed class JwtTokenProvider : IJwtTokenProvider
|
||||
{
|
||||
|
||||
+4
-4
@@ -2,11 +2,11 @@ using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Diagnostics;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Vortex.Modules.Identity.Application.Abstractions;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Application.Abstractions;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
|
||||
/// <summary>
|
||||
/// Контекст базы данных для модуля Identity.
|
||||
|
||||
+3
-3
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(IdentityDbContext))]
|
||||
[Migration("20260311180816_InitialIdentity")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.User", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitialIdentity : Migration
|
||||
|
||||
+5
-5
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(IdentityDbContext))]
|
||||
[Migration("20260311200839_UpdateIdentityWithNewFieldsAndTables")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Friendship", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Friendship", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -52,7 +52,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Friendships", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Story", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Story", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -85,7 +85,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Stories", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.User", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class UpdateIdentityWithNewFieldsAndTables : Migration
|
||||
|
||||
+5
-5
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(IdentityDbContext))]
|
||||
[Migration("20260311215347_AddHideStoryViewsToUser")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Friendship", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Friendship", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -52,7 +52,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Friendships", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Story", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Story", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -85,7 +85,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Stories", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.User", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddHideStoryViewsToUser : Migration
|
||||
|
||||
+9
-9
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(IdentityDbContext))]
|
||||
[Migration("20260312174453_AddHideStoryViewsAndFixStoryViewer")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Friendship", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Friendship", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -52,7 +52,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Friendships", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Story", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Story", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -85,7 +85,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Stories", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryViewer", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryViewer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -108,7 +108,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("StoryViewers", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.User", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -159,16 +159,16 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Users", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryViewer", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryViewer", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Identity.Domain.Story", null)
|
||||
b.HasOne("Knot.Modules.Identity.Domain.Story", null)
|
||||
.WithMany("Viewers")
|
||||
.HasForeignKey("StoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Story", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Story", b =>
|
||||
{
|
||||
b.Navigation("Viewers");
|
||||
});
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddHideStoryViewsAndFixStoryViewer : Migration
|
||||
|
||||
+15
-15
@@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(IdentityDbContext))]
|
||||
[Migration("20260313115319_AddStoryReactionsReplies")]
|
||||
@@ -26,7 +26,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Friendship", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Friendship", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -52,7 +52,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Friendships", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Story", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Story", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -85,7 +85,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Stories", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryReaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryReaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -113,7 +113,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("StoryReactions", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryReply", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryReply", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -140,7 +140,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("StoryReplies", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryViewer", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryViewer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -163,7 +163,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("StoryViewers", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.User", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -214,34 +214,34 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Users", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryReaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryReaction", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Identity.Domain.Story", null)
|
||||
b.HasOne("Knot.Modules.Identity.Domain.Story", null)
|
||||
.WithMany("Reactions")
|
||||
.HasForeignKey("StoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryReply", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryReply", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Identity.Domain.Story", null)
|
||||
b.HasOne("Knot.Modules.Identity.Domain.Story", null)
|
||||
.WithMany("Replies")
|
||||
.HasForeignKey("StoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryViewer", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryViewer", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Identity.Domain.Story", null)
|
||||
b.HasOne("Knot.Modules.Identity.Domain.Story", null)
|
||||
.WithMany("Viewers")
|
||||
.HasForeignKey("StoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Story", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Story", b =>
|
||||
{
|
||||
b.Navigation("Reactions");
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddStoryReactionsReplies : Migration
|
||||
|
||||
+15
-15
@@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
using Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(IdentityDbContext))]
|
||||
partial class IdentityDbContextModelSnapshot : ModelSnapshot
|
||||
@@ -23,7 +23,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Friendship", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Friendship", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -49,7 +49,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Friendships", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Story", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Story", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -82,7 +82,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Stories", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryReaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryReaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -110,7 +110,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("StoryReactions", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryReply", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryReply", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -137,7 +137,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("StoryReplies", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryViewer", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryViewer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -160,7 +160,7 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("StoryViewers", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.User", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -211,34 +211,34 @@ namespace Vortex.Modules.Identity.Infrastructure.Persistence.Migrations
|
||||
b.ToTable("Users", "identity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryReaction", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryReaction", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Identity.Domain.Story", null)
|
||||
b.HasOne("Knot.Modules.Identity.Domain.Story", null)
|
||||
.WithMany("Reactions")
|
||||
.HasForeignKey("StoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryReply", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryReply", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Identity.Domain.Story", null)
|
||||
b.HasOne("Knot.Modules.Identity.Domain.Story", null)
|
||||
.WithMany("Replies")
|
||||
.HasForeignKey("StoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.StoryViewer", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.StoryViewer", b =>
|
||||
{
|
||||
b.HasOne("Vortex.Modules.Identity.Domain.Story", null)
|
||||
b.HasOne("Knot.Modules.Identity.Domain.Story", null)
|
||||
.WithMany("Viewers")
|
||||
.HasForeignKey("StoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Vortex.Modules.Identity.Domain.Story", b =>
|
||||
modelBuilder.Entity("Knot.Modules.Identity.Domain.Story", b =>
|
||||
{
|
||||
b.Navigation("Reactions");
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Persistence;
|
||||
namespace Knot.Modules.Identity.Infrastructure.Persistence;
|
||||
|
||||
/// <summary>
|
||||
/// Реализация репозитория пользователей с использованием EF Core.
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
using Vortex.Shared.Kernel;
|
||||
using Vortex.Modules.Identity.Domain;
|
||||
using Knot.Shared.Kernel;
|
||||
using Knot.Modules.Identity.Domain;
|
||||
|
||||
namespace Vortex.Modules.Identity.Infrastructure.Services;
|
||||
namespace Knot.Modules.Identity.Infrastructure.Services;
|
||||
|
||||
public sealed class UserDisplayNameProvider : IUserDisplayNameProvider
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\Vortex.Shared.Kernel\Vortex.Shared.Kernel.csproj" />
|
||||
<ProjectReference Include="..\..\Shared\Knot.Shared.Kernel\Knot.Shared.Kernel.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Knot.Shared.Infrastructure;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
|
||||
namespace Vortex.Shared.Infrastructure;
|
||||
namespace Knot.Shared.Infrastructure;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Vortex.Shared.Kernel\Vortex.Shared.Kernel.csproj" />
|
||||
<ProjectReference Include="..\Knot.Shared.Kernel\Knot.Shared.Kernel.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
+1
-1
@@ -3,7 +3,7 @@ using System.Text.Json;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Vortex.Shared.Infrastructure.Middleware;
|
||||
namespace Knot.Shared.Infrastructure.Middleware;
|
||||
|
||||
public sealed class ExceptionHandlingMiddleware
|
||||
{
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Security.Claims;
|
||||
using Vortex.Shared.Kernel;
|
||||
using Knot.Shared.Kernel;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
|
||||
namespace Vortex.Shared.Infrastructure;
|
||||
namespace Knot.Shared.Infrastructure;
|
||||
|
||||
public sealed class UserContext : IUserContext
|
||||
{
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using MediatR;
|
||||
|
||||
namespace Vortex.Shared.Kernel;
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
/// <summary>
|
||||
/// Маркерный интерфейс для корней агрегатов (Aggregate Roots).
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Vortex.Shared.Kernel;
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
/// <summary>
|
||||
/// Базовый класс для всех сущностей в системе.
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using MediatR;
|
||||
|
||||
namespace Vortex.Shared.Kernel;
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
public interface ICommand : IRequest<Result> { }
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Vortex.Shared.Kernel;
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
/// <summary>
|
||||
/// Интерфейс для паттерна Unit of Work, обеспечивающий атомарность операций в рамках одной транзакции БД.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Vortex.Shared.Kernel;
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
public interface IUserContext
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Vortex.Shared.Kernel;
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
public record UserInfo(Guid Id, string Username, string DisplayName, string? Avatar);
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Vortex.Shared.Kernel;
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
/// <summary>
|
||||
/// Представляет ошибку в доменной логике.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
namespace Vortex.Shared.Kernel;
|
||||
namespace Knot.Shared.Kernel;
|
||||
|
||||
/// <summary>
|
||||
/// Базовый класс для объектов-значений (Value Objects).
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Vortex.Shared.Infrastructure;
|
||||
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user