Очистка мусора

This commit is contained in:
Халимов Рустам
2026-03-15 21:36:49 +03:00
parent c14999d319
commit 893c9f2316
424 changed files with 689 additions and 493340 deletions

65
.gitignore vendored
View File

@@ -9,18 +9,19 @@ coverage/
# Build output
dist/
build/
apps/server/dist/
apps/web/dist/
[Bb]in/
[Oo]bj/
out/
TestResults/
*.tsbuildinfo
# Vite / Configs
.vite/
# Environment files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
apps/server/.env
apps/web/.env
.env.*
!.env.example
# Logs
npm-debug.log*
@@ -32,6 +33,11 @@ eslint-debug.log*
# Editor/IDE
.idea/
.vscode/
.vs/
*.user
*.userosscache
*.sln.docstates
*.suo
*.swp
*.swo
*.sublime-project
@@ -54,47 +60,28 @@ Thumbs.db
.docker-compose.local.yml
# Uploads and User Data
apps/server/uploads/*
uploads/
!uploads/.gitkeep
apps/server/uploads/
!apps/server/uploads/.gitkeep
apps/server/uploads/avatars/*
apps/server/uploads/avatars/
!apps/server/uploads/avatars/.gitkeep
apps/server-net/uploads/
!apps/server-net/uploads/.gitkeep
# Deploy artifacts
vortex-deploy/
vortex-deploy.tar.gz
vortex-deploy.zip
knot-deploy/
*.tar.gz
*.zip
CREDENTIALS.txt
SECURITY_AUDIT.md
# Postgres data (from docker-compose)
postgres_data/
# Misc
.cache/
.eslintcache
.npm/
.tmp/
tmp/
.env.example
apps/server-net/src/Shared/Vortex.Shared.Infrastructure/bin/
apps/server-net/src/Shared/Vortex.Shared.Infrastructure/obj/
apps/server-net/src/Shared/Vortex.Shared.Kernel/bin/
apps/server-net/src/Shared/Vortex.Shared.Kernel/obj/
apps/server-net/src/Modules/Chats/bin/
apps/server-net/src/Modules/Chats/obj/
apps/server-net/src/Modules/Identity/bin/
apps/server-net/src/Modules/Identity/obj/
apps/server-net/tests/Vortex.Modules.Chats.UnitTests/bin/
apps/server-net/tests/Vortex.Modules.Chats.UnitTests/obj/
apps/server-net/tests/Vortex.Modules.Identity.UnitTests/bin/
apps/server-net/tests/Vortex.Modules.Identity.UnitTests/obj/

View File

@@ -1,108 +0,0 @@
# Vortex Messenger — Настройка конфигурации
> Если вы используете `deploy.sh` — всё ниже подставляется автоматически.
> Этот файл нужен для ручной настройки или если вы хотите понимать, что где лежит.
---
## 1. Файл `update-local.bat` (на вашем ПК)
Откройте файл и замените IP на ваш:
```
set SERVER_IP=<IP вашего VPS>
```
---
## 2. Файл `apps/server/.env` (на сервере)
Скопируйте `.env.example` и заполните:
```env
# Порт HTTP-сервера (обычно менять не нужно)
PORT=3001
# Секрет для подписи JWT-токенов — длинная случайная строка
# Сгенерировать: node -e "console.log(require('crypto').randomBytes(48).toString('base64url'))"
JWT_SECRET=<ВАШ_СЛУЧАЙНЫЙ_СЕКРЕТ>
# Строка подключения к PostgreSQL
# Формат: postgresql://ПОЛЬЗОВАТЕЛЬ:ПАРОЛЬ@localhost:5432/ИМЯ_БАЗЫ
DATABASE_URL=postgresql://vortex:<ПАРОЛЬ_БД>@localhost:5432/vortex
# Ключ шифрования сообщений (64 hex-символа = 32 байта)
# Сгенерировать: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# ⚠ ВАЖНО: при утере ключа все зашифрованные сообщения станут нечитаемы!
ENCRYPTION_KEY=<64_HEX_СИМВОЛА>
# Режим работы
NODE_ENV=production
# Разрешённые домены для CORS (ваш домен с https://)
CORS_ORIGINS=https://<ВАШ_ДОМЕН>
# Лимит регистраций с одного IP
MAX_REGISTRATIONS_PER_IP=5
# TURN-сервер для звонков (coturn)
TURN_URL=turn:<ВАШ_ДОМЕН>:3478
TURN_SECRET=<СЕКРЕТ_TURN_СЕРВЕРА>
STUN_URLS=stun:stun.l.google.com:19302,stun:<ВАШ_ДОМЕН>:3478
```
---
## 3. Конфигурация coturn (на сервере)
Файл `/etc/turnserver.conf`:
```
realm=<ВАШ_ДОМЕН>
server-name=<ВАШ_ДОМЕН>
static-auth-secret=<СЕКРЕТ_TURN_СЕРВЕРА> # тот же что TURN_SECRET в .env
```
---
## 4. Nginx (на сервере)
Файл `/etc/nginx/sites-available/vortex` — замените `server_name`:
```
server_name <ВАШ_ДОМЕН>;
```
---
## 5. Генерация ключей
```bash
# JWT-секрет (64 символа)
node -e "console.log(require('crypto').randomBytes(48).toString('base64url'))"
# Ключ шифрования сообщений (64 hex-символа)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# Пароль для базы данных (32 символа)
node -e "console.log(require('crypto').randomBytes(24).toString('base64url').slice(0,32))"
# TURN-секрет (32 символа)
node -e "console.log(require('crypto').randomBytes(24).toString('base64url').slice(0,32))"
```
---
## 6. Сводная таблица
| Где | Что заменить | Пример значения |
|-----|-------------|-----------------|
| `update-local.bat` строка 9 | `SERVER_IP` | `203.0.113.50` |
| `.env``JWT_SECRET` | Случайная строка 64+ символов | см. раздел 5 |
| `.env``DATABASE_URL` | Пароль пользователя БД | `postgresql://vortex:MyPass123@localhost:5432/vortex` |
| `.env``ENCRYPTION_KEY` | 64 hex-символа | см. раздел 5 |
| `.env``CORS_ORIGINS` | Ваш домен с `https://` | `https://chat.example.com` |
| `.env``TURN_URL` | Ваш домен | `turn:chat.example.com:3478` |
| `.env``TURN_SECRET` | Случайная строка | см. раздел 5 |
| `/etc/turnserver.conf` | `realm`, `server-name`, `static-auth-secret` | Ваш домен + TURN_SECRET |
| Nginx → `server_name` | Ваш домен | `chat.example.com` |

View File

@@ -1,215 +0,0 @@
# Vortex Messenger — Руководство по развёртыванию
## Что понадобится
| Что | Детали |
|-----|--------|
| **VPS** | Ubuntu 22.04 / 24.04, от 1 ГБ RAM, публичный IP |
| **Домен** | С A-записью, направленной на IP вашего VPS |
| **Email** | Для получения SSL-сертификата (Let's Encrypt) |
| **ПК** | Windows / macOS / Linux с SSH-клиентом |
---
## 1. Подготовка сервера
### 1.1 Покупка VPS
Купите VPS у провайдера (Timeweb Cloud, Hetzner, DigitalOcean и т.д.).
Запишите **IP** и **root-пароль**.
### 1.2 Покупка домена
Купите домен и в DNS-настройках реестра создайте A-запись:
```
Тип: A
Хост: @
Значение: <IP вашего VPS>
```
> Может потребоваться до 24 часов для распространения DNS (обычно 515 минут).
---
## 2. Загрузка проекта на сервер
С вашего ПК (из папки с проектом):
```bash
# Создать папку на сервере
ssh root@<IP> "mkdir -p /var/www/vortex"
# Скопировать файлы проекта
scp -r ./* root@<IP>:/var/www/vortex/
```
> Замените `<IP>` на IP вашего VPS. При первом подключении подтвердите fingerprint (`yes`) и введите root-пароль.
---
## 3. Запуск автоматического деплоя
```bash
# Подключиться к серверу
ssh root@<IP>
# Дать права на запуск
chmod +x /var/www/vortex/deploy.sh
# Запустить деплой
/var/www/vortex/deploy.sh
```
Скрипт спросит:
- **Домен** — ваш домен (например `messenger.example.com`)
- **Email** — для SSL-сертификата
Всё остальное (Node.js, PostgreSQL, Nginx, Certbot, coturn, PM2) установится и настроится автоматически.
---
## 4. Что делает скрипт
| Шаг | Действие |
|-----|----------|
| 1/10 | Обновление системы, установка базовых утилит |
| 2/10 | Установка Node.js 20 и PM2 |
| 3/10 | Установка PostgreSQL, создание БД и пользователя |
| 4/10 | Установка Nginx |
| 5/10 | Установка Certbot для SSL |
| 6/10 | Установка coturn (TURN-сервер для звонков) |
| 7/10 | Создание `.env` с автогенерированными ключами |
| 8/10 | `npm install`, Prisma миграции, сборка бэкенда и фронтенда |
| 9/10 | Настройка Nginx (reverse proxy, SSL, блокировка доступа по IP) |
| 10/10 | Запуск сервера через PM2 с автозапуском |
По завершении:
- Кредитные данные сохраняются в `/var/www/vortex/CREDENTIALS.txt` (доступ только root)
- Скрипт обновления создаётся в `/var/www/vortex/update.sh`
---
## 5. Настройка конфигурации
Подробная инструкция по всем параметрам, которые нужно подставить под себя — в отдельном файле **[CONFIGURATION.md](CONFIGURATION.md)**.
> При использовании `deploy.sh` всё настраивается автоматически. `CONFIGURATION.md` нужен только для ручной настройки или понимания структуры.
---
## 6. После установки
Откройте в браузере:
```
https://ваш-домен.ru
```
---
## 7. Полезные команды на сервере
```bash
# ─── Подключение к серверу ───
ssh root@<IP>
# ─── Логи приложения ───
pm2 logs vortex-server # все логи
pm2 logs vortex-server --lines 50 # последние 50 строк
# ─── Управление сервером ───
pm2 restart vortex-server # перезапуск
pm2 stop vortex-server # остановка
pm2 start vortex-server # запуск
pm2 monit # мониторинг в реальном времени
# ─── Статус ───
pm2 status # список процессов
pm2 info vortex-server # детальная информация
# ─── Nginx ───
nginx -t # проверить конфигурацию
systemctl reload nginx # перезагрузить Nginx
systemctl status nginx # статус Nginx
# ─── Логи Nginx ───
tail -f /var/log/nginx/access.log # логи входящих запросов
tail -f /var/log/nginx/error.log # логи ошибок
# ─── PostgreSQL ───
sudo -u postgres psql -d vortex # подключиться к БД
\dt # список таблиц (внутри psql)
\q # выход из psql
# ─── coturn (TURN-сервер) ───
systemctl status coturn # статус TURN
systemctl restart coturn # перезапуск TURN
# ─── SSL сертификат ───
certbot renew --dry-run # проверка обновления сертификата
certbot certificates # список сертификатов
# ─── Файрвол ───
ufw status # статус файрвола
ufw allow 22/tcp # SSH
ufw allow 80/tcp # HTTP
ufw allow 443/tcp # HTTPS
ufw allow 3478/tcp # TURN TCP
ufw allow 3478/udp # TURN UDP
# ─── Файлы проекта ───
ls /var/www/vortex/ # корень проекта
cat /var/www/vortex/apps/server/.env # посмотреть env
cat /var/www/vortex/CREDENTIALS.txt # все сгенерированные пароли
```
---
## 8. Обновление проекта
### С Windows (update-local.bat)
1. Внесите изменения в код на ПК
2. Отредактируйте `update-local.bat` — впишите IP вашего сервера в переменную `SERVER_IP`
3. Запустите `update-local.bat` — он соберёт архив и загрузит на сервер
4. Подключитесь к серверу и запустите:
```bash
ssh root@<IP>
/var/www/vortex/update.sh
```
### Вручную
```bash
# На ПК: заархивировать проект (без node_modules, dist, .env)
tar -czf vortex-deploy.tar.gz --exclude='node_modules' --exclude='dist' --exclude='.env' --exclude='uploads/avatars/*' -C . .
# Загрузить на сервер
scp vortex-deploy.tar.gz root@<IP>:/root/
# На сервере: запустить обновление
ssh root@<IP>
/var/www/vortex/update.sh
```
Скрипт `update.sh` автоматически:
- Остановит сервер
- Сделает бэкап `.env` и аватаров
- Распакует обновление
- Восстановит `.env` и аватары
- Установит зависимости, применит миграции, пересоберёт
- Запустит сервер
---
## 9. Устранение проблем
| Проблема | Решение |
|----------|---------|
| Сайт не открывается | `pm2 logs vortex-server --lines 30` — проверить ошибки |
| 502 Bad Gateway | `pm2 restart vortex-server` — бэкенд упал |
| SSL не получен | Проверить DNS: `dig +short ваш-домен.ru` должен показать IP сервера. Повторить: `certbot --nginx -d ваш-домен.ru` |
| Звонки не работают | `systemctl status coturn` — проверить TURN-сервер. Порты 3478 TCP/UDP должны быть открыты |
| БД недоступна | `systemctl status postgresql``systemctl start postgresql` |
| Сервер не стартует после ребута | `pm2 startup` и `pm2 save` |
| Нет места на диске | `df -h` → очистить логи: `pm2 flush` |

View File

@@ -1,90 +0,0 @@
# Развертывание Vortex в Dokploy
Dokploy — это мощная self-hosted PaaS платформа, которая упрощает деплой Docker-приложений. Есть два способа развернуть Vortex в Dokploy.
## Способ 1: С использованием Docker Compose (Самый простой)
Этот метод объединяет базу данных и приложения в один стек.
1. **Создайте проект**: В панели Dokploy создайте новый "Project".
2. **Добавьте Compose сервис**:
* Нажмите "Add Service" -> "Compose".
* Подключите ваш GitHub/GitLab репозиторий.
* Выберите нужную ветку (например, `main`).
3. **Настройте переменные окружения**:
* Во вкладке "Environment" добавьте следующие переменные:
* `JWT_SECRET`: Длинная случайная строка (ключ для авторизации).
* `CORS_ORIGINS`: `https://vortex.your-domain.com` (замените на ваш реальный домен).
* `ENCRYPTION_KEY`: 64-символьная HEX-строка (например, `0123...`).
4. **Укажите домен**:
* Перейдите во вкладку "Domains".
* Dokploy автоматически настроит Traefik для основного сервиса `web`, если вы укажете домен здесь.
5. **Деплой**: Нажмите кнопку "Deploy".
## Способ 2: Нативный метод Dokploy (Рекомендуется для Production)
Этот метод использует встроенные базы данных Dokploy для лучшего управления бэкапами и производительностью.
### 1. Создайте базу данных
* В Dokploy перейдите в "Databases" -> "PostgreSQL".
* Создайте новую базу данных.
* После создания перейдите во вкладку "Internal Connection", чтобы получить `DATABASE_URL`.
### 2. Создайте приложение для Сервера (Backend)
* Add Service -> "Application".
* Подключите репозиторий.
* **Настройки сборки (Build Settings)**:
* Docker Context: `.`
* Dockerfile Path: `Dockerfile.server`
* **Переменные окружения (Environment Variables)**:
* `DATABASE_URL`: (Вставьте URL из шага 1)
* `PORT`: `3001`
* `JWT_SECRET`: (Случайная строка)
* `ENCRYPTION_KEY`: (64 символа hex)
* `CORS_ORIGINS`: `https://vortex.your-domain.com`
* **Сеть (Networking)**:
* Port: `3001`
### 3. Создайте приложение для Веб-интерфейса (Frontend)
* Add Service -> "Application".
* Подключите репозиторий.
* **Настройки сборки (Build Settings)**:
* Docker Context: `.`
* Dockerfile Path: `Dockerfile.web`
* **Домены**:
* Добавьте ваш домен (например, `vortex.example.com`).
* **Сеть (Networking)**:
* Port: `80`
## Важные настройки
### 1. Постоянное хранение файлов (Persistence)
Если вы используете Способ 2, не забудьте настроить **Volumes** для приложения сервера, чтобы аватарки и файлы не удалялись при каждом обновлении кода:
* Путь в контейнере: `/app/apps/server/uploads`
* Путь на хосте: `/var/lib/dokploy/vortex/uploads`
## Настройка звонков (TURN сервер)
Для того чтобы звонки работали через интернет (вне локальной сети), обязателен TURN-сервер. Я добавил его в `docker-compose.yml`.
**Важно:** Чтобы звонки заработали, вам НУЖНО открыть следующие порты на вашем сервере/роутере:
1. `3478` (TCP и UDP) — основной порт TURN.
2. `49152-49170` (UDP) — диапазон портов для передачи медиа-трафика.
В Dokploy убедитесь, что в переменных окружения прописан ваш домен:
* `DOMAIN`: `mess.khomegeneric.keenetic.pro`
* `TURN_SECRET`: `dcf1c1827c0c520d45130e282ea26991`
## Запуск в локальной сети (без домена / по IP)
Если вы хотите пользоваться мессенджером прямо сейчас по IP-адресу или в локальной сети:
1. **Настройка CORS**: В переменных окружения `CORS_ORIGINS` укажите IP вашего сервера:
* Пример: `http://192.168.1.50,http://localhost`
2. **Домен в Dokploy**:
* При добавлении домена в Dokploy можно указать локальный IP или временное имя.
* Если Dokploy требует обязательный домен для SSL, а у вас его нет, вы можете обращаться к сервису по порту напрямую (по умолчанию 80-й порт веб-интерфейса проброшен на хост).
3. **Важное ограничение (WebRTC)**:
* **Звонки и микрофон** в браузерах работают только через `https://` или на `localhost`.
* При доступе по обычному IP (например, `http://192.168.1.50`) браузер **заблокирует** доступ к камере и микрофону из соображений безопасности.
* **Решение**: Для полноценной работы звонков в локальной сети рекомендуется использовать самоподписанный сертификат или настроить в браузере флаг `unsafely-treat-insecure-origin-as-secure`.

View File

@@ -1,28 +0,0 @@
FROM node:20-alpine
WORKDIR /app
# Install dependencies at the root
COPY package*.json ./
COPY apps/server/package*.json ./apps/server/
COPY apps/web/package*.json ./apps/web/
RUN npm install
# Copy source and prisma
COPY apps/server ./apps/server
# Generate Prisma client
WORKDIR /app/apps/server
RUN npx prisma generate
# Build server
RUN npm run build
# Make start script executable
RUN chmod +x ./start.sh
EXPOSE 3001
# Run the server using the start script
CMD ["./start.sh"]

View File

@@ -3,10 +3,10 @@ WORKDIR /app
# Copy everything and restore as distinct layers
COPY . .
RUN dotnet restore apps/server-net/Vortex.sln
RUN dotnet restore apps/server-net/Knot.sln
# Build and publish a release
RUN dotnet publish apps/server-net/src/Vortex.Host/Vortex.Host.csproj -c Release -o out
RUN dotnet publish apps/server-net/src/Host/Host.csproj -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview
@@ -20,4 +20,4 @@ COPY --from=build /app/out .
EXPOSE 8080
ENV ASPNETCORE_URLS=http://+:8080
ENTRYPOINT ["dotnet", "Vortex.Host.dll"]
ENTRYPOINT ["dotnet", "Host.dll"]

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2026 Vortex Messenger
Copyright (c) 2026 Knot Messenger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -1,6 +1,6 @@
# SelfHost Messenger (Vortex)
# Knot Messenger (Knot)
SelfHost Messenger — это современный, безопасный и многофункциональный мессенджер с открытым исходным кодом, который вы полностью можете развернуть на собственных серверах (self-hosted). Проект разработан на стеке **React + TypeScript + Vite** для фронтенда и **.NET (C#) + PostgreSQL + SignalR** для бэкенда.
Knot Messenger — это современный, безопасный и многофункциональный мессенджер с открытым исходным кодом, который вы полностью можете развернуть на собственных серверах (self-hosted). Проект разработан на стеке **React + TypeScript + Vite** для фронтенда и **.NET (C#) + PostgreSQL + SignalR** для бэкенда.
## 🚀 Текущий функционал
@@ -52,9 +52,9 @@ SelfHost Messenger — это современный, безопасный и м
docker-compose up -d
```
В результате поднимутся 3 контейнера:
* `vortex-db` — База данных Postgres.
* `vortex-server` — Основной бэкенд на порту `:5059`.
* `vortex-web` — Фронтенд (Nginx + React) на порту `:9090`.
* `knot-db` — База данных Postgres.
* `knot-server` — Основной бэкенд на порту `:5059`.
* `knot-web` — Фронтенд (Nginx + React) на порту `:9090`.
*Для продакшена (Dokploy) используйте гайд из файла `DOKPLOY.md` и `DEPLOYMENT.md` в этом же или соседних файлах, указав SSL сертификаты и правильные домены.*
@@ -90,7 +90,7 @@ docker run -d \
*Замените `USER_NAME` и `SECRET_PASSWORD` на собственные логин и пароль.*
### Настройка в проекте
После установки Coturn, перейдите в файл `.env` корневого проекта Vortex и задайте переменные:
После установки Coturn, перейдите в файл `.env` корневого проекта Knot и задайте переменные:
```env
TURN_URL=turn:ВАШ_БЕЛЫЙ_IP_ТУТ:3478
TURN_USERNAME=USER_NAME

View File

@@ -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

View File

@@ -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]")]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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,

View File

@@ -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;
}

View File

@@ -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]

View File

@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
namespace Vortex.Host.Controllers;
namespace Host.Controllers;
[Authorize]
[ApiController]

View File

@@ -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>

View File

@@ -0,0 +1,6 @@
@Host_HostAddress = http://localhost:5059
GET {{Host_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@@ -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();

View File

@@ -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
}
}

View File

@@ -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.

View File

@@ -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>
/// Команда для создания чата.

View File

@@ -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>;

View File

@@ -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();
}
}

View File

@@ -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,

View File

@@ -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,

View File

@@ -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;

View File

@@ -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>
/// Команда для отправки сообщения в чат.

View File

@@ -1,4 +1,4 @@
namespace Vortex.Modules.Chats;
namespace Knot.Modules.Chats;
public class Class1
{

View File

@@ -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
{

View File

@@ -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;

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -1,6 +1,6 @@
using Vortex.Shared.Kernel;
using Knot.Shared.Kernel;
namespace Vortex.Modules.Chats.Domain;
namespace Knot.Modules.Chats.Domain;
/// <summary>
/// Доменное событие: сообщение отправлено.

View File

@@ -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>
{

View File

@@ -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>
/// Обработчик доменного события создания чата.

View File

@@ -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>
/// Обработчик доменного события отправки сообщения.

View File

@@ -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
{

View File

@@ -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>
/// Контекст базы данных для модуля чатов.

View File

@@ -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
{

View File

@@ -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()

View File

@@ -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

View File

@@ -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");
});

View File

@@ -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

View File

@@ -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");
});

View File

@@ -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

View File

@@ -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");
});

View File

@@ -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

View File

@@ -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");
});

View File

@@ -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

View File

@@ -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");

View File

@@ -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

View File

@@ -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");

View File

@@ -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

View File

@@ -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");

View File

@@ -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

View File

@@ -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");

View File

@@ -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

View File

@@ -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");

View File

@@ -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)

View File

@@ -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>

View File

@@ -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.

View File

@@ -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
{

View File

@@ -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 токен.

View File

@@ -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>
/// Команда для регистрации нового пользователя.

View File

@@ -1,4 +1,4 @@
namespace Vortex.Modules.Identity;
namespace Knot.Modules.Identity;
public class Class1
{

View File

@@ -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 =>

View File

@@ -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
{

View File

@@ -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>
/// Интерфейс репозитория для работы с пользователями.

View File

@@ -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>
{

View File

@@ -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>
{

View File

@@ -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>
{

View File

@@ -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>
{

View File

@@ -1,6 +1,6 @@
using Vortex.Shared.Kernel;
using Knot.Shared.Kernel;
namespace Vortex.Modules.Identity.Domain;
namespace Knot.Modules.Identity.Domain;
/// <summary>
/// Сущность пользователя в контексте идентификации (Identity).

View File

@@ -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
{

View File

@@ -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.

View File

@@ -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()

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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");
});

View File

@@ -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

View File

@@ -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");

View File

@@ -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

View File

@@ -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");

View File

@@ -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.

View File

@@ -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
{

View File

@@ -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>

View File

@@ -0,0 +1,6 @@
namespace Knot.Shared.Infrastructure;
public class Class1
{
}

View File

@@ -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
{

View File

@@ -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>

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -1,6 +1,6 @@
using MediatR;
namespace Vortex.Shared.Kernel;
namespace Knot.Shared.Kernel;
/// <summary>
/// Маркерный интерфейс для корней агрегатов (Aggregate Roots).

View File

@@ -0,0 +1,6 @@
namespace Knot.Shared.Kernel;
public class Class1
{
}

View File

@@ -1,4 +1,4 @@
namespace Vortex.Shared.Kernel;
namespace Knot.Shared.Kernel;
/// <summary>
/// Базовый класс для всех сущностей в системе.

Some files were not shown because too many files have changed in this diff Show More