diff --git a/Api/Application/Common/Exceptions/ResultExtensions.cs b/Api/Application/Common/Exceptions/ResultExtensions.cs index 8acc4eb..f83eb24 100644 --- a/Api/Application/Common/Exceptions/ResultExtensions.cs +++ b/Api/Application/Common/Exceptions/ResultExtensions.cs @@ -1,4 +1,4 @@ -using Api.Application.Common.Results; +using Client.Models.Models.Common.Results; namespace Api.Application.Common.Exceptions; diff --git a/Api/Application/Common/ServiceCollectionExtensions.cs b/Api/Application/Common/ServiceCollectionExtensions.cs index 5a2f000..59192d2 100644 --- a/Api/Application/Common/ServiceCollectionExtensions.cs +++ b/Api/Application/Common/ServiceCollectionExtensions.cs @@ -1,5 +1,6 @@ using System.Reflection; using Amazon.S3; +using Client.Models.Models.Configs; using Infrastructure.Api; using Infrastructure.DataAccess; using Infrastructure.Interfaces; @@ -9,7 +10,6 @@ using Microsoft.Extensions.Options; using Microsoft.OpenApi.Models; using Npgsql; -using Shared.Models.Configs; namespace Api.Application.Common; diff --git a/Api/Application/Features/Auth/AuthController.cs b/Api/Application/Features/Auth/AuthController.cs index 3782cca..f73a0bf 100644 --- a/Api/Application/Features/Auth/AuthController.cs +++ b/Api/Application/Features/Auth/AuthController.cs @@ -1,11 +1,11 @@ using Api.Application.Features.Auth.Login; using Api.Application.Features.Auth.Refresh; using Api.Application.Features.Auth.Register; +using Client.Models.Models.DTO.Request; using Infrastructure.Security; using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Shared.Models.DTO.Request; namespace Api.Application.Features.Auth; diff --git a/Api/Application/Features/Auth/Login/LoginUserCommand.cs b/Api/Application/Features/Auth/Login/LoginUserCommand.cs index ef83693..8e7fcae 100644 --- a/Api/Application/Features/Auth/Login/LoginUserCommand.cs +++ b/Api/Application/Features/Auth/Login/LoginUserCommand.cs @@ -1,5 +1,5 @@ +using Client.Models.Models.DTO.Response; using MediatR; -using Shared.Models.DTO.Response; namespace Api.Application.Features.Auth.Login; diff --git a/Api/Application/Features/Auth/Login/LoginUserHandler.cs b/Api/Application/Features/Auth/Login/LoginUserHandler.cs index 7648c84..f11b836 100644 --- a/Api/Application/Features/Auth/Login/LoginUserHandler.cs +++ b/Api/Application/Features/Auth/Login/LoginUserHandler.cs @@ -1,7 +1,7 @@ using Api.Application.Common.Exceptions; +using Client.Models.Models.DTO.Response; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.DTO.Response; namespace Api.Application.Features.Auth.Login; @@ -20,6 +20,6 @@ public async Task Handle(LoginUserCommand command, if (loginStatus) return new LoginUserResponse(tokenService.GenerateAccessToken(username), tokenService.GenerateRefreshToken(username)); - throw new ApiException(StatusCodes.Status401Unauthorized, "Incorrect password or username"); + throw new ApiException(StatusCodes.Status401Unauthorized, "Неверный логин или пароль"); } } \ No newline at end of file diff --git a/Api/Application/Features/Auth/Login/LoginUserValidation.cs b/Api/Application/Features/Auth/Login/LoginUserValidation.cs index 27c78a6..cbc4bc9 100644 --- a/Api/Application/Features/Auth/Login/LoginUserValidation.cs +++ b/Api/Application/Features/Auth/Login/LoginUserValidation.cs @@ -7,12 +7,12 @@ public static class LoginUserValidation public static void Validate(LoginUserCommand command) { if (string.IsNullOrWhiteSpace(command.Username)) - throw new ApiException(StatusCodes.Status400BadRequest, "Username is required"); + throw new ApiException(StatusCodes.Status400BadRequest, "Введите имя пользователя"); if (string.IsNullOrWhiteSpace(command.Password)) - throw new ApiException(StatusCodes.Status400BadRequest, "Password is required"); + throw new ApiException(StatusCodes.Status400BadRequest, "Введите пароль"); if (command.Password.Length < 5) - throw new ApiException(StatusCodes.Status400BadRequest, "Password is too short"); + throw new ApiException(StatusCodes.Status400BadRequest, "Пароль слишком короткий"); } } \ No newline at end of file diff --git a/Api/Application/Features/Auth/Refresh/RefreshCommand.cs b/Api/Application/Features/Auth/Refresh/RefreshCommand.cs index 55a02a1..ba6532e 100644 --- a/Api/Application/Features/Auth/Refresh/RefreshCommand.cs +++ b/Api/Application/Features/Auth/Refresh/RefreshCommand.cs @@ -1,5 +1,5 @@ +using Client.Models.Models.DTO.Response; using MediatR; -using Shared.Models.DTO.Response; namespace Api.Application.Features.Auth.Refresh; diff --git a/Api/Application/Features/Auth/Refresh/RefreshHandler.cs b/Api/Application/Features/Auth/Refresh/RefreshHandler.cs index b5374f9..03c4645 100644 --- a/Api/Application/Features/Auth/Refresh/RefreshHandler.cs +++ b/Api/Application/Features/Auth/Refresh/RefreshHandler.cs @@ -1,6 +1,6 @@ +using Client.Models.Models.DTO.Response; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.DTO.Response; namespace Api.Application.Features.Auth.Refresh; diff --git a/Api/Application/Features/Auth/Register/RegisterUserCommand.cs b/Api/Application/Features/Auth/Register/RegisterUserCommand.cs index 626ab8c..2e3f0a5 100644 --- a/Api/Application/Features/Auth/Register/RegisterUserCommand.cs +++ b/Api/Application/Features/Auth/Register/RegisterUserCommand.cs @@ -1,5 +1,5 @@ -using MediatR; -using Shared.Models.DTO.Response; +using Client.Models.Models.DTO.Response; +using MediatR; namespace Api.Application.Features.Auth.Register; diff --git a/Api/Application/Features/Auth/Register/RegisterUserHandler.cs b/Api/Application/Features/Auth/Register/RegisterUserHandler.cs index 0472d14..ca2fe5b 100644 --- a/Api/Application/Features/Auth/Register/RegisterUserHandler.cs +++ b/Api/Application/Features/Auth/Register/RegisterUserHandler.cs @@ -1,7 +1,7 @@ using Api.Application.Common.Exceptions; +using Client.Models.Models.DTO.Response; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.DTO.Response; namespace Api.Application.Features.Auth.Register; diff --git a/Api/Application/Features/Auth/Register/RegisterUserValidation.cs b/Api/Application/Features/Auth/Register/RegisterUserValidation.cs index 6cca987..46cf3b3 100644 --- a/Api/Application/Features/Auth/Register/RegisterUserValidation.cs +++ b/Api/Application/Features/Auth/Register/RegisterUserValidation.cs @@ -7,12 +7,12 @@ public static class RegisterUserValidation public static void Validate(RegisterUserCommand command) { if (string.IsNullOrWhiteSpace(command.Username)) - throw new ApiException(StatusCodes.Status400BadRequest, "Username is required"); + throw new ApiException(StatusCodes.Status400BadRequest, "Введите имя пользователя"); if (string.IsNullOrWhiteSpace(command.Password)) - throw new ApiException(StatusCodes.Status400BadRequest, "Password is required"); + throw new ApiException(StatusCodes.Status400BadRequest, "Введите пароль"); if (command.Password.Length < 5) - throw new ApiException(StatusCodes.Status400BadRequest, "Password is too short"); + throw new ApiException(StatusCodes.Status400BadRequest, "Пароль слишком короткий"); } } \ No newline at end of file diff --git a/Api/Application/Features/Metrics/GetMetrics/GetMetricsHandler.cs b/Api/Application/Features/Metrics/GetMetrics/GetMetricsHandler.cs index c0ecdb6..8f3bf5e 100644 --- a/Api/Application/Features/Metrics/GetMetrics/GetMetricsHandler.cs +++ b/Api/Application/Features/Metrics/GetMetrics/GetMetricsHandler.cs @@ -1,6 +1,6 @@ +using Client.Models.Models.Entities; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Entities; namespace Api.Application.Features.Metrics.GetMetrics; diff --git a/Api/Application/Features/Metrics/GetMetrics/GetMetricsQuery.cs b/Api/Application/Features/Metrics/GetMetrics/GetMetricsQuery.cs index f31ad05..2dae45a 100644 --- a/Api/Application/Features/Metrics/GetMetrics/GetMetricsQuery.cs +++ b/Api/Application/Features/Metrics/GetMetrics/GetMetricsQuery.cs @@ -1,5 +1,5 @@ +using Client.Models.Models.Entities; using MediatR; -using Shared.Models.Entities; namespace Api.Application.Features.Metrics.GetMetrics; diff --git a/Api/Application/Features/Metrics/MetricsController.cs b/Api/Application/Features/Metrics/MetricsController.cs index 93d5e15..c02f827 100644 --- a/Api/Application/Features/Metrics/MetricsController.cs +++ b/Api/Application/Features/Metrics/MetricsController.cs @@ -1,11 +1,12 @@ using Api.Application.Features.Metrics.GetMetrics; +using Client.Models.Models.Enums; namespace Api.Application.Features.Metrics; using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Shared.Models.Enums; + [ApiController] [Route("api/")] public class MetricsController( diff --git a/Api/Application/Features/Moderation/ApproveTask/ChangeTaskStatusHandler.cs b/Api/Application/Features/Moderation/ApproveTask/ChangeTaskStatusHandler.cs index 0b0249f..5a13246 100644 --- a/Api/Application/Features/Moderation/ApproveTask/ChangeTaskStatusHandler.cs +++ b/Api/Application/Features/Moderation/ApproveTask/ChangeTaskStatusHandler.cs @@ -1,7 +1,6 @@ -using Infrastructure.DataAccess; +using Client.Models.Models.Enums; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Enums; namespace Api.Application.Features.Moderation.ApproveTask; @@ -14,7 +13,7 @@ public async Task Handle(ChangeTaskStatusQuery request, CancellationToken var reward = await tasks.GetReward(request.UserTaskId); if (request.Status == ModerationStatus.Approved) { - await users.AddMoney(user.Username, reward); + await users.AddMoney(user!.Username, reward); if ((user.Experience + 1) % 5 == 0) { await users.AddLevel(user.Username, 1); diff --git a/Api/Application/Features/Moderation/ApproveTask/ChangeTaskStatusQuery.cs b/Api/Application/Features/Moderation/ApproveTask/ChangeTaskStatusQuery.cs index 93fefb2..041586d 100644 --- a/Api/Application/Features/Moderation/ApproveTask/ChangeTaskStatusQuery.cs +++ b/Api/Application/Features/Moderation/ApproveTask/ChangeTaskStatusQuery.cs @@ -1,5 +1,5 @@ +using Client.Models.Models.Enums; using MediatR; -using Shared.Models.Enums; namespace Api.Application.Features.Moderation.ApproveTask; diff --git a/Api/Application/Features/Moderation/GetNextForModeration/GetNextForModerationHandler.cs b/Api/Application/Features/Moderation/GetNextForModeration/GetNextForModerationHandler.cs index c48f859..9ec595e 100644 --- a/Api/Application/Features/Moderation/GetNextForModeration/GetNextForModerationHandler.cs +++ b/Api/Application/Features/Moderation/GetNextForModeration/GetNextForModerationHandler.cs @@ -1,6 +1,6 @@ +using Client.Models.Models.Entities; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Entities; namespace Api.Application.Features.Moderation.GetNextForModeration; diff --git a/Api/Application/Features/Moderation/GetNextForModeration/GetNextForModerationQuery.cs b/Api/Application/Features/Moderation/GetNextForModeration/GetNextForModerationQuery.cs index 6467f26..8823d33 100644 --- a/Api/Application/Features/Moderation/GetNextForModeration/GetNextForModerationQuery.cs +++ b/Api/Application/Features/Moderation/GetNextForModeration/GetNextForModerationQuery.cs @@ -1,5 +1,5 @@ -using MediatR; -using Shared.Models.Entities; +using Client.Models.Models.Entities; +using MediatR; namespace Api.Application.Features.Moderation.GetNextForModeration; diff --git a/Api/Application/Features/Moderation/ModerationController.cs b/Api/Application/Features/Moderation/ModerationController.cs index dbf944f..0ea2ed3 100644 --- a/Api/Application/Features/Moderation/ModerationController.cs +++ b/Api/Application/Features/Moderation/ModerationController.cs @@ -2,10 +2,10 @@ using Api.Application.Features.Moderation.CheckModerator; using Api.Application.Features.Moderation.GetModerationStatus; using Api.Application.Features.Moderation.GetNextForModeration; +using Client.Models.Models.Enums; using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Shared.Models.Enums; namespace Api.Application.Features.Moderation; diff --git a/Api/Application/Features/Photos/UploadPhoto/UploadPhotoHandler.cs b/Api/Application/Features/Photos/UploadPhoto/UploadPhotoHandler.cs index ad0a6e5..ea317f2 100644 --- a/Api/Application/Features/Photos/UploadPhoto/UploadPhotoHandler.cs +++ b/Api/Application/Features/Photos/UploadPhoto/UploadPhotoHandler.cs @@ -1,9 +1,9 @@ using Amazon.S3; using Amazon.S3.Model; +using Client.Models.Models.Configs; using ImageMagick; using MediatR; using Microsoft.Extensions.Options; -using Shared.Models.Configs; namespace Api.Application.Features.Photos.UploadPhoto; diff --git a/Api/Application/Features/Tasks/ChangeTask/ChangeTaskHandler.cs b/Api/Application/Features/Tasks/ChangeTask/ChangeTaskHandler.cs index 3f2a014..374e064 100644 --- a/Api/Application/Features/Tasks/ChangeTask/ChangeTaskHandler.cs +++ b/Api/Application/Features/Tasks/ChangeTask/ChangeTaskHandler.cs @@ -1,7 +1,7 @@ -using Infrastructure.Interfaces; +using Client.Models.Models.Entities; +using Client.Models.Models.Enums; +using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Entities; -using Shared.Models.Enums; namespace Api.Application.Features.Tasks.ChangeTask; @@ -20,6 +20,6 @@ public async Task Handle(ChangeTaskQuery request, CancellationToken c await users.AddMoney(username, -(int)(reward.Result * Coefficient)); await metrics.AddRecord(username, MetricType.Change); - return newTask; + return newTask!; } } \ No newline at end of file diff --git a/Api/Application/Features/Tasks/ChangeTask/ChangeTaskQuery.cs b/Api/Application/Features/Tasks/ChangeTask/ChangeTaskQuery.cs index 8c2128d..1ad7f54 100644 --- a/Api/Application/Features/Tasks/ChangeTask/ChangeTaskQuery.cs +++ b/Api/Application/Features/Tasks/ChangeTask/ChangeTaskQuery.cs @@ -1,5 +1,5 @@ -using MediatR; -using Shared.Models.Entities; +using Client.Models.Models.Entities; +using MediatR; namespace Api.Application.Features.Tasks.ChangeTask; diff --git a/Api/Application/Features/Tasks/GetCompletedTasks/GetCompletedTasksHandler.cs b/Api/Application/Features/Tasks/GetCompletedTasks/GetCompletedTasksHandler.cs index 53ed618..f4fe15c 100644 --- a/Api/Application/Features/Tasks/GetCompletedTasks/GetCompletedTasksHandler.cs +++ b/Api/Application/Features/Tasks/GetCompletedTasks/GetCompletedTasksHandler.cs @@ -1,6 +1,6 @@ -using Infrastructure.Interfaces; +using Client.Models.Models.Entities; +using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Entities; namespace Api.Application.Features.Tasks.GetCompletedTasks; diff --git a/Api/Application/Features/Tasks/GetCompletedTasks/GetCompletedTasksQuery.cs b/Api/Application/Features/Tasks/GetCompletedTasks/GetCompletedTasksQuery.cs index 2fa2b9c..d5bab8e 100644 --- a/Api/Application/Features/Tasks/GetCompletedTasks/GetCompletedTasksQuery.cs +++ b/Api/Application/Features/Tasks/GetCompletedTasks/GetCompletedTasksQuery.cs @@ -1,5 +1,5 @@ -using MediatR; -using Shared.Models.Entities; +using Client.Models.Models.Entities; +using MediatR; namespace Api.Application.Features.Tasks.GetCompletedTasks; diff --git a/Api/Application/Features/Tasks/GetTask/GetTaskHandler.cs b/Api/Application/Features/Tasks/GetTask/GetTaskHandler.cs index 0b03d22..9669d53 100644 --- a/Api/Application/Features/Tasks/GetTask/GetTaskHandler.cs +++ b/Api/Application/Features/Tasks/GetTask/GetTaskHandler.cs @@ -1,7 +1,7 @@ using Api.Application.Common.Exceptions; +using Client.Models.Models.Entities; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Entities; namespace Api.Application.Features.Tasks.GetTask; @@ -12,6 +12,6 @@ public async Task Handle(GetTaskQuery request, CancellationToken canc var task = await tasks.GetTaskFullInfo(request.TaskId); return task ?? throw new ApiException(StatusCodes.Status404NotFound, - $"Task {request.TaskId} for {request.Username} not found"); + $"Задача {request.TaskId} для пользователя {request.Username} не найдена"); } } \ No newline at end of file diff --git a/Api/Application/Features/Tasks/GetTask/GetTaskQuery.cs b/Api/Application/Features/Tasks/GetTask/GetTaskQuery.cs index 11e92bc..4efa351 100644 --- a/Api/Application/Features/Tasks/GetTask/GetTaskQuery.cs +++ b/Api/Application/Features/Tasks/GetTask/GetTaskQuery.cs @@ -1,5 +1,5 @@ -using MediatR; -using Shared.Models.Entities; +using Client.Models.Models.Entities; +using MediatR; namespace Api.Application.Features.Tasks.GetTask; diff --git a/Api/Application/Features/Tasks/GetTasks/GetTasksHandler.cs b/Api/Application/Features/Tasks/GetTasks/GetTasksHandler.cs index 3318170..ee58810 100644 --- a/Api/Application/Features/Tasks/GetTasks/GetTasksHandler.cs +++ b/Api/Application/Features/Tasks/GetTasks/GetTasksHandler.cs @@ -1,6 +1,6 @@ -using Infrastructure.Interfaces; +using Client.Models.Models.Entities; +using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Entities; namespace Api.Application.Features.Tasks.GetTasks; diff --git a/Api/Application/Features/Tasks/GetTasks/GetTasksQuery.cs b/Api/Application/Features/Tasks/GetTasks/GetTasksQuery.cs index 59164b5..a958ae8 100644 --- a/Api/Application/Features/Tasks/GetTasks/GetTasksQuery.cs +++ b/Api/Application/Features/Tasks/GetTasks/GetTasksQuery.cs @@ -1,5 +1,5 @@ -using MediatR; -using Shared.Models.Entities; +using Client.Models.Models.Entities; +using MediatR; namespace Api.Application.Features.Tasks.GetTasks; diff --git a/Api/Application/Features/Tasks/SubmitTask/SubmitTaskHandler.cs b/Api/Application/Features/Tasks/SubmitTask/SubmitTaskHandler.cs index 6530ef8..d98d888 100644 --- a/Api/Application/Features/Tasks/SubmitTask/SubmitTaskHandler.cs +++ b/Api/Application/Features/Tasks/SubmitTask/SubmitTaskHandler.cs @@ -1,7 +1,7 @@ using Api.Application.Features.Photos.UploadPhoto; +using Client.Models.Models.Enums; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Enums; namespace Api.Application.Features.Tasks.SubmitTask; diff --git a/Api/Application/Features/Users/GetUser/GetUserHandler.cs b/Api/Application/Features/Users/GetUser/GetUserHandler.cs index f9c6252..85b4a1e 100644 --- a/Api/Application/Features/Users/GetUser/GetUserHandler.cs +++ b/Api/Application/Features/Users/GetUser/GetUserHandler.cs @@ -1,7 +1,7 @@ using Api.Application.Common.Exceptions; +using Client.Models.Models.Entities; using Infrastructure.Interfaces; using MediatR; -using Shared.Models.Entities; namespace Api.Application.Features.Users.GetUser; @@ -10,6 +10,6 @@ public class GetUserHandler(IUserTable users) : IRequestHandler Handle(GetUserQuery request, CancellationToken cancellationToken) { var user = await users.GetUser(request.Username); - return user ?? throw new ApiException(StatusCodes.Status404NotFound, "User not found"); + return user ?? throw new ApiException(StatusCodes.Status404NotFound, "Пользователь не найден"); } } \ No newline at end of file diff --git a/Api/Application/Features/Users/GetUser/GetUserQuery.cs b/Api/Application/Features/Users/GetUser/GetUserQuery.cs index 08e248a..1eb484f 100644 --- a/Api/Application/Features/Users/GetUser/GetUserQuery.cs +++ b/Api/Application/Features/Users/GetUser/GetUserQuery.cs @@ -1,5 +1,5 @@ -using MediatR; -using Shared.Models.Entities; +using Client.Models.Models.Entities; +using MediatR; namespace Api.Application.Features.Users.GetUser; diff --git a/Api/Program.cs b/Api/Program.cs index 6508601..8de1b92 100644 --- a/Api/Program.cs +++ b/Api/Program.cs @@ -1,8 +1,5 @@ using Api.Application.Common; using Api.Middlewares; -using Infrastructure.Interfaces; -using Infrastructure.Security; -using Shared.Models.Configs; var builder = WebApplication.CreateBuilder(args); diff --git a/Client.Models/Client.Models.csproj b/Client.Models/Client.Models.csproj index c406dd0..b78459e 100644 --- a/Client.Models/Client.Models.csproj +++ b/Client.Models/Client.Models.csproj @@ -4,7 +4,6 @@ net9.0 enable enable - Shared diff --git a/Client.Models/Models/Common/Results/Result.cs b/Client.Models/Models/Common/Results/Result.cs index a037c8a..092ad6d 100644 --- a/Client.Models/Models/Common/Results/Result.cs +++ b/Client.Models/Models/Common/Results/Result.cs @@ -1,4 +1,4 @@ -namespace Api.Application.Common.Results; +namespace Client.Models.Models.Common.Results; public readonly record struct Error(string Code, string Message); diff --git a/Client.Models/Models/Configs/DbConfig.cs b/Client.Models/Models/Configs/DbConfig.cs deleted file mode 100644 index 19ad555..0000000 --- a/Client.Models/Models/Configs/DbConfig.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Shared.Models.Configs; - -public class DbConfig -{ -} \ No newline at end of file diff --git a/Client.Models/Models/Configs/MediatRConfig.cs b/Client.Models/Models/Configs/MediatRConfig.cs index 7b7e9a1..9faf4ed 100644 --- a/Client.Models/Models/Configs/MediatRConfig.cs +++ b/Client.Models/Models/Configs/MediatRConfig.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Configs; +namespace Client.Models.Models.Configs; public class MediatRConfig { diff --git a/Client.Models/Models/Configs/WeatherConfig.cs b/Client.Models/Models/Configs/WeatherConfig.cs index 1c743a0..68ea511 100644 --- a/Client.Models/Models/Configs/WeatherConfig.cs +++ b/Client.Models/Models/Configs/WeatherConfig.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Configs; +namespace Client.Models.Models.Configs; public class WeatherConfig { diff --git a/Client.Models/Models/Configs/YosConfig.cs b/Client.Models/Models/Configs/YosConfig.cs index 74b41bb..dfdf403 100644 --- a/Client.Models/Models/Configs/YosConfig.cs +++ b/Client.Models/Models/Configs/YosConfig.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Configs; +namespace Client.Models.Models.Configs; public class YosConfig { diff --git a/Client.Models/Models/DTO/Request/LoginRequest.cs b/Client.Models/Models/DTO/Request/LoginRequest.cs index 3b2de30..dfe36a2 100644 --- a/Client.Models/Models/DTO/Request/LoginRequest.cs +++ b/Client.Models/Models/DTO/Request/LoginRequest.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.DTO.Request; +namespace Client.Models.Models.DTO.Request; public sealed class LoginRequest { diff --git a/Client.Models/Models/DTO/Request/RegisterRequest.cs b/Client.Models/Models/DTO/Request/RegisterRequest.cs index a54e043..f986f98 100644 --- a/Client.Models/Models/DTO/Request/RegisterRequest.cs +++ b/Client.Models/Models/DTO/Request/RegisterRequest.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.DTO.Request; +namespace Client.Models.Models.DTO.Request; public sealed class RegisterRequest { diff --git a/Client.Models/Models/DTO/Response/LoginUserResponse.cs b/Client.Models/Models/DTO/Response/LoginUserResponse.cs index f1c4aa3..47a7c4d 100644 --- a/Client.Models/Models/DTO/Response/LoginUserResponse.cs +++ b/Client.Models/Models/DTO/Response/LoginUserResponse.cs @@ -1,3 +1,3 @@ -namespace Shared.Models.DTO.Response; +namespace Client.Models.Models.DTO.Response; public record LoginUserResponse(string AccessToken, string RefreshToken); \ No newline at end of file diff --git a/Client.Models/Models/DTO/Response/RefreshResponse.cs b/Client.Models/Models/DTO/Response/RefreshResponse.cs index c9e1952..36d1d66 100644 --- a/Client.Models/Models/DTO/Response/RefreshResponse.cs +++ b/Client.Models/Models/DTO/Response/RefreshResponse.cs @@ -1,3 +1,3 @@ -namespace Shared.Models.DTO.Response; +namespace Client.Models.Models.DTO.Response; public record RefreshResponse(string AccessToken, string RefreshToken); \ No newline at end of file diff --git a/Client.Models/Models/DTO/Response/RegisterUserResponse.cs b/Client.Models/Models/DTO/Response/RegisterUserResponse.cs index 2711afe..1ac9591 100644 --- a/Client.Models/Models/DTO/Response/RegisterUserResponse.cs +++ b/Client.Models/Models/DTO/Response/RegisterUserResponse.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.DTO.Response; +namespace Client.Models.Models.DTO.Response; public record RegisterUserResponse( bool Status diff --git a/Client.Models/Models/Entities/MetricModel.cs b/Client.Models/Models/Entities/MetricModel.cs index 3453c0c..84a1a9a 100644 --- a/Client.Models/Models/Entities/MetricModel.cs +++ b/Client.Models/Models/Entities/MetricModel.cs @@ -1,6 +1,6 @@ -using Shared.Models.Enums; +using Client.Models.Models.Enums; -namespace Shared.Models.Entities; +namespace Client.Models.Models.Entities; public class MetricModel { diff --git a/Client.Models/Models/Entities/ModerationTask.cs b/Client.Models/Models/Entities/ModerationTask.cs index 3015a49..f334ef5 100644 --- a/Client.Models/Models/Entities/ModerationTask.cs +++ b/Client.Models/Models/Entities/ModerationTask.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Entities; +namespace Client.Models.Models.Entities; public class ModerationTask { diff --git a/Client.Models/Models/Entities/TaskModel.cs b/Client.Models/Models/Entities/TaskModel.cs index d7ac681..37649c0 100644 --- a/Client.Models/Models/Entities/TaskModel.cs +++ b/Client.Models/Models/Entities/TaskModel.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Entities; +namespace Client.Models.Models.Entities; public class TaskModel { diff --git a/Client.Models/Models/Entities/TaskModelExtendedInfo.cs b/Client.Models/Models/Entities/TaskModelExtendedInfo.cs index f34ebf8..663a76d 100644 --- a/Client.Models/Models/Entities/TaskModelExtendedInfo.cs +++ b/Client.Models/Models/Entities/TaskModelExtendedInfo.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Entities; +namespace Client.Models.Models.Entities; public class TaskModelExtendedInfo { diff --git a/Client.Models/Models/Entities/User.cs b/Client.Models/Models/Entities/User.cs index 5604134..58bc11c 100644 --- a/Client.Models/Models/Entities/User.cs +++ b/Client.Models/Models/Entities/User.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Entities; +namespace Client.Models.Models.Entities; public class User { diff --git a/Client.Models/Models/Enums/JwtRoles.cs b/Client.Models/Models/Enums/JwtRoles.cs index 759f69a..0136290 100644 --- a/Client.Models/Models/Enums/JwtRoles.cs +++ b/Client.Models/Models/Enums/JwtRoles.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Enums; +namespace Client.Models.Models.Enums; public enum UserRole { diff --git a/Client.Models/Models/Enums/JwtTokenType.cs b/Client.Models/Models/Enums/JwtTokenType.cs index 19fe162..caf0405 100644 --- a/Client.Models/Models/Enums/JwtTokenType.cs +++ b/Client.Models/Models/Enums/JwtTokenType.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Enums; +namespace Client.Models.Models.Enums; public enum TokenType { diff --git a/Client.Models/Models/Enums/MetricType.cs b/Client.Models/Models/Enums/MetricType.cs index 248a75a..62e41e2 100644 --- a/Client.Models/Models/Enums/MetricType.cs +++ b/Client.Models/Models/Enums/MetricType.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Enums; +namespace Client.Models.Models.Enums; public enum MetricType { diff --git a/Client.Models/Models/Enums/ModerationStatus.cs b/Client.Models/Models/Enums/ModerationStatus.cs index 36988be..b8d1d62 100644 --- a/Client.Models/Models/Enums/ModerationStatus.cs +++ b/Client.Models/Models/Enums/ModerationStatus.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.Enums; +namespace Client.Models.Models.Enums; public enum ModerationStatus { diff --git a/Client.Models/Models/ExternalApi/OpenWeatherResponse.cs b/Client.Models/Models/ExternalApi/OpenWeatherResponse.cs index 96410bf..b3bdc83 100644 --- a/Client.Models/Models/ExternalApi/OpenWeatherResponse.cs +++ b/Client.Models/Models/ExternalApi/OpenWeatherResponse.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Shared.Models.ExternalApi; +namespace Client.Models.Models.ExternalApi; public class OpenWeatherResponse { diff --git a/Client.Models/Models/ExternalApi/TemperatureInfo.cs b/Client.Models/Models/ExternalApi/TemperatureInfo.cs index e1bf9e7..70faafd 100644 --- a/Client.Models/Models/ExternalApi/TemperatureInfo.cs +++ b/Client.Models/Models/ExternalApi/TemperatureInfo.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Shared.Models.ExternalApi; +namespace Client.Models.Models.ExternalApi; public class TemperatureInfo { diff --git a/Client.Models/Models/ExternalApi/WeatherDescription.cs b/Client.Models/Models/ExternalApi/WeatherDescription.cs index abbd6d1..24f2a49 100644 --- a/Client.Models/Models/ExternalApi/WeatherDescription.cs +++ b/Client.Models/Models/ExternalApi/WeatherDescription.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Shared.Models.ExternalApi; +namespace Client.Models.Models.ExternalApi; public class WeatherDescription { diff --git a/Client.Models/Models/ExternalApi/WeatherInfo.cs b/Client.Models/Models/ExternalApi/WeatherInfo.cs index 1f7b8d5..ffd8df7 100644 --- a/Client.Models/Models/ExternalApi/WeatherInfo.cs +++ b/Client.Models/Models/ExternalApi/WeatherInfo.cs @@ -1,4 +1,4 @@ -namespace Shared.Models.ExternalApi; +namespace Client.Models.Models.ExternalApi; public class WeatherInfo { diff --git a/Infrastructure/Api/WeatherService.cs b/Infrastructure/Api/WeatherService.cs index 956303e..ac17ffd 100644 --- a/Infrastructure/Api/WeatherService.cs +++ b/Infrastructure/Api/WeatherService.cs @@ -1,8 +1,8 @@ -using Api.Application.Common.Results; +using Client.Models.Models.Common.Results; +using Client.Models.Models.Configs; +using Client.Models.Models.ExternalApi; using Infrastructure.Interfaces; using Microsoft.Extensions.Options; -using Shared.Models.Configs; -using Shared.Models.ExternalApi; namespace Infrastructure.Api; diff --git a/Infrastructure/DataAccess/MetricsTable.cs b/Infrastructure/DataAccess/MetricsTable.cs index be48ac7..334a328 100644 --- a/Infrastructure/DataAccess/MetricsTable.cs +++ b/Infrastructure/DataAccess/MetricsTable.cs @@ -1,9 +1,9 @@ +using Client.Models.Models.Entities; +using Client.Models.Models.Enums; using Infrastructure.Interfaces; using InterpolatedSql.Dapper; using Microsoft.Extensions.Logging; using Npgsql; -using Shared.Models.Entities; -using Shared.Models.Enums; namespace Infrastructure.DataAccess; diff --git a/Infrastructure/DataAccess/RandomTaskEvent.cs b/Infrastructure/DataAccess/RandomTaskEvent.cs index 43132b0..009921c 100644 --- a/Infrastructure/DataAccess/RandomTaskEvent.cs +++ b/Infrastructure/DataAccess/RandomTaskEvent.cs @@ -1,8 +1,8 @@ +using Client.Models.Models.Entities; +using Client.Models.Models.Enums; using Infrastructure.Interfaces; using Npgsql; -using Shared.Models.Entities; using InterpolatedSql.Dapper; -using Shared.Models.Enums; namespace Infrastructure.DataAccess; diff --git a/Infrastructure/DataAccess/UserTable.cs b/Infrastructure/DataAccess/UserTable.cs index e6ffa21..843e37a 100644 --- a/Infrastructure/DataAccess/UserTable.cs +++ b/Infrastructure/DataAccess/UserTable.cs @@ -1,5 +1,5 @@ +using Client.Models.Models.Entities; using Infrastructure.Interfaces; -using Shared.Models.Entities; using Npgsql; using InterpolatedSql.Dapper; diff --git a/Infrastructure/DataAccess/UsersTasksTable.cs b/Infrastructure/DataAccess/UsersTasksTable.cs index 08c385a..b9028c0 100644 --- a/Infrastructure/DataAccess/UsersTasksTable.cs +++ b/Infrastructure/DataAccess/UsersTasksTable.cs @@ -1,10 +1,9 @@ +using Client.Models.Models.Entities; +using Client.Models.Models.Enums; using Infrastructure.DbExtensions; using Infrastructure.Interfaces; using Npgsql; using InterpolatedSql.Dapper; -using Shared.Models.Entities; -using Shared.Models.Enums; -using Microsoft.Extensions.Logging; namespace Infrastructure.DataAccess; diff --git a/Infrastructure/DbExtensions/ModerationTaskDbExtension.cs b/Infrastructure/DbExtensions/ModerationTaskDbExtension.cs index 93bc3ac..63da3f7 100644 --- a/Infrastructure/DbExtensions/ModerationTaskDbExtension.cs +++ b/Infrastructure/DbExtensions/ModerationTaskDbExtension.cs @@ -1,4 +1,4 @@ -using Shared.Models.Entities; +using Client.Models.Models.Entities; namespace Infrastructure.DbExtensions; diff --git a/Infrastructure/DbExtensions/TaskModelExtendedInfoDbExtension.cs b/Infrastructure/DbExtensions/TaskModelExtendedInfoDbExtension.cs index 08239ba..691080f 100644 --- a/Infrastructure/DbExtensions/TaskModelExtendedInfoDbExtension.cs +++ b/Infrastructure/DbExtensions/TaskModelExtendedInfoDbExtension.cs @@ -1,5 +1,5 @@ +using Client.Models.Models.Entities; using Infrastructure.Interfaces; -using Shared.Models.Entities; namespace Infrastructure.DbExtensions; diff --git a/Infrastructure/Interfaces/IMetricsTable.cs b/Infrastructure/Interfaces/IMetricsTable.cs index 4cd2882..f675e41 100644 --- a/Infrastructure/Interfaces/IMetricsTable.cs +++ b/Infrastructure/Interfaces/IMetricsTable.cs @@ -1,5 +1,5 @@ -using Shared.Models.Entities; -using Shared.Models.Enums; +using Client.Models.Models.Entities; +using Client.Models.Models.Enums; namespace Infrastructure.Interfaces; diff --git a/Infrastructure/Interfaces/ITaskEvent.cs b/Infrastructure/Interfaces/ITaskEvent.cs index 39687a0..2999716 100644 --- a/Infrastructure/Interfaces/ITaskEvent.cs +++ b/Infrastructure/Interfaces/ITaskEvent.cs @@ -1,4 +1,4 @@ -using Shared.Models.Entities; +using Client.Models.Models.Entities; namespace Infrastructure.Interfaces; diff --git a/Infrastructure/Interfaces/IUserTable.cs b/Infrastructure/Interfaces/IUserTable.cs index 2f03978..bf1f364 100644 --- a/Infrastructure/Interfaces/IUserTable.cs +++ b/Infrastructure/Interfaces/IUserTable.cs @@ -1,4 +1,4 @@ -using Shared.Models.Entities; +using Client.Models.Models.Entities; namespace Infrastructure.Interfaces; diff --git a/Infrastructure/Interfaces/IUsersTasksTable.cs b/Infrastructure/Interfaces/IUsersTasksTable.cs index 9012f5b..5721bab 100644 --- a/Infrastructure/Interfaces/IUsersTasksTable.cs +++ b/Infrastructure/Interfaces/IUsersTasksTable.cs @@ -1,5 +1,5 @@ -using Shared.Models.Entities; -using Shared.Models.Enums; +using Client.Models.Models.Entities; +using Client.Models.Models.Enums; namespace Infrastructure.Interfaces; diff --git a/Infrastructure/Interfaces/IWeatherApi.cs b/Infrastructure/Interfaces/IWeatherApi.cs index d9b2b00..685ef0c 100644 --- a/Infrastructure/Interfaces/IWeatherApi.cs +++ b/Infrastructure/Interfaces/IWeatherApi.cs @@ -1,5 +1,5 @@ -using Api.Application.Common.Results; -using Shared.Models.ExternalApi; +using Client.Models.Models.Common.Results; +using Client.Models.Models.ExternalApi; namespace Infrastructure.Interfaces; diff --git a/Infrastructure/Mocks/MetricsTableMock.cs b/Infrastructure/Mocks/MetricsTableMock.cs index 62799a2..86ead7f 100644 --- a/Infrastructure/Mocks/MetricsTableMock.cs +++ b/Infrastructure/Mocks/MetricsTableMock.cs @@ -1,6 +1,6 @@ +using Client.Models.Models.Entities; +using Client.Models.Models.Enums; using Infrastructure.Interfaces; -using Shared.Models.Entities; -using Shared.Models.Enums; namespace Infrastructure.Mocks; diff --git a/Infrastructure/Mocks/UserTableMock.cs b/Infrastructure/Mocks/UserTableMock.cs index 66af70a..945e5fc 100644 --- a/Infrastructure/Mocks/UserTableMock.cs +++ b/Infrastructure/Mocks/UserTableMock.cs @@ -1,4 +1,4 @@ -using Shared.Models.Entities; +using Client.Models.Models.Entities; namespace Infrastructure.Mocks; diff --git a/Infrastructure/Mocks/UsersTasksTableMock.cs b/Infrastructure/Mocks/UsersTasksTableMock.cs index 6402c24..2430b0f 100644 --- a/Infrastructure/Mocks/UsersTasksTableMock.cs +++ b/Infrastructure/Mocks/UsersTasksTableMock.cs @@ -1,6 +1,6 @@ -using Infrastructure.Interfaces; -using Shared.Models.Entities; -using Shared.Models.Enums; +using Client.Models.Models.Entities; +using Client.Models.Models.Enums; +using Infrastructure.Interfaces; namespace Infrastructure.Mocks; diff --git a/Infrastructure/Security/AuthExtensions.cs b/Infrastructure/Security/AuthExtensions.cs index 6e99d55..a1a3ece 100644 --- a/Infrastructure/Security/AuthExtensions.cs +++ b/Infrastructure/Security/AuthExtensions.cs @@ -1,8 +1,8 @@ +using Client.Models.Models.Enums; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Tokens; -using Shared.Models.Enums; namespace Infrastructure.Security; diff --git a/Infrastructure/Security/JwtTokenService.cs b/Infrastructure/Security/JwtTokenService.cs index 2d3a2f7..42cf05e 100644 --- a/Infrastructure/Security/JwtTokenService.cs +++ b/Infrastructure/Security/JwtTokenService.cs @@ -1,10 +1,10 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using System.Text; +using Client.Models.Models.Enums; using Infrastructure.Interfaces; using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; -using Shared.Models.Enums; namespace Infrastructure.Security; diff --git a/Infrastructure/Services/YandexStorageService.cs b/Infrastructure/Services/YandexStorageService.cs index 6dffba8..121a724 100644 --- a/Infrastructure/Services/YandexStorageService.cs +++ b/Infrastructure/Services/YandexStorageService.cs @@ -1,8 +1,8 @@ using Amazon.S3; using Amazon.S3.Model; +using Client.Models.Models.Configs; using Infrastructure.Interfaces; using Microsoft.Extensions.Options; -using Shared.Models.Configs; namespace Infrastructure.Services; diff --git a/Test/Fake/FakeStorageService.cs b/Test/Fake/FakeStorageService.cs index c54accb..3e23540 100644 --- a/Test/Fake/FakeStorageService.cs +++ b/Test/Fake/FakeStorageService.cs @@ -1,5 +1,7 @@ using Infrastructure.Interfaces; +namespace Test.Fake; + public sealed class FakeStorageService : IStorageService { public Task> GetTemporaryUrlsAsync(List fileNames) diff --git a/Test/Infrastructure/DbConectionTest.cs b/Test/Infrastructure/DbConectionTest.cs index da998f7..b0a7905 100644 --- a/Test/Infrastructure/DbConectionTest.cs +++ b/Test/Infrastructure/DbConectionTest.cs @@ -1,7 +1,6 @@ using Dapper; -using Npgsql; -using NUnit.Framework; -using Test; + +namespace Test.Infrastructure; [TestFixture] public class DbSmokeTests : TestBase diff --git a/Test/Infrastructure/UserTableTests.cs b/Test/Infrastructure/UserTableTests.cs index 095adf4..e181dcb 100644 --- a/Test/Infrastructure/UserTableTests.cs +++ b/Test/Infrastructure/UserTableTests.cs @@ -1,10 +1,8 @@ -using Dapper; using Infrastructure.Interfaces; using InterpolatedSql.Dapper; using Microsoft.Extensions.DependencyInjection; -using NUnit.Framework; -using Shared.Models.Entities; -using Test; + +namespace Test.Infrastructure; [TestFixture] public class UserTableTests : TestBase diff --git a/Test/Infrastructure/UsersTasksTableTests.cs b/Test/Infrastructure/UsersTasksTableTests.cs index 8928dd5..070526a 100644 --- a/Test/Infrastructure/UsersTasksTableTests.cs +++ b/Test/Infrastructure/UsersTasksTableTests.cs @@ -1,10 +1,9 @@ -using Dapper; +using Client.Models.Models.Enums; using Infrastructure.Interfaces; -using Microsoft.Extensions.DependencyInjection; using InterpolatedSql.Dapper; -using NUnit.Framework; -using Shared.Models.Enums; -using Test; +using Microsoft.Extensions.DependencyInjection; + +namespace Test.Infrastructure; [TestFixture] public class UsersTasksTableTests : TestBase