From 6b765d3b72a40c32c836ec2e8a99b4a5868f1792 Mon Sep 17 00:00:00 2001 From: Vanderlan Gomes da Silva Date: Sun, 24 Sep 2023 11:55:05 -0300 Subject: [PATCH 1/2] Rename project to Orion --- Dockerfile | 6 +- .../Attributes/AuthorizeForAttribute.cs | 2 +- .../Config/DomainToOutputProfile.cs | 8 +- .../AutoMapper/Config/InputToDomainProfile.cs | 6 +- .../AutoMapper/Input/CustomerInput.cs | 2 +- .../AutoMapper/Input/UserInput.cs | 4 +- .../AutoMapper/Output/CustomerOutput.cs | 2 +- .../AutoMapper/Output/UserOutput.cs | 6 +- .../Controllers/ApiController.cs | 10 +- .../Controllers/AuthController.cs | 18 +- .../Controllers/CustomersController.cs | 28 +- .../Controllers/UsersController.cs | 28 +- .../Jwt/JwtConfiguration.cs | 2 +- .../Middleware/OrionMiddleware.cs | 10 +- .../Models/AuthUserModel.cs | 2 +- .../Models/RefreshTokenModel.cs | 4 +- .../Models/UserApiTokenModel.cs | 4 +- .../Models/UserLoginModel.cs | 2 +- .../Orion.Api.csproj | 12 +- {VBaseProject.Api => Orion.Api}/Program.cs | 8 +- .../Properties/launchSettings.json | 20 +- {VBaseProject.Api => Orion.Api}/Startup.cs | 41 +-- .../ValidateModelStateAttribute .cs | 2 +- .../Validators/CustomerValidator.cs | 10 +- .../appsettings.Development.json | 2 +- .../appsettings.Production.json | 2 +- .../appsettings.Test.json | 2 +- .../appsettings.json | 0 {VBaseProject.Api => Orion.Api}/nlog.config | 0 .../Context/DataContext.cs | 8 +- .../Mapping/CustomerMapping.cs | 4 +- .../Mapping/RefreshTokenMapping.cs | 4 +- .../Mapping/UserMapping.cs | 6 +- .../20210311124539_Initial.Designer.cs | 12 +- .../Migrations/20210311124539_Initial.cs | 4 +- ...3163754_ChangeRefreshTokenSize.Designer.cs | 12 +- .../20210313163754_ChangeRefreshTokenSize.cs | 4 +- .../Migrations/DataContextModelSnapshot.cs | 12 +- .../Orion.Data.csproj | 6 +- .../Generic/BaseEntityRepository.cs | 6 +- .../Generic/IBaseEntityRepository.cs | 2 +- .../Implementations/CustomerRepository.cs | 16 +- .../Implementations/RefreshTokenRepository.cs | 10 +- .../Implementations/UserRepository.cs | 16 +- .../UnitOfWork/UnitOfWorkEntity.cs | 10 +- .../AuthenticationConfiguration.cs | 2 +- .../Base/IBaseService.cs | 2 +- .../Exceptions/BusinessException.cs | 2 +- .../Exceptions/ConflictException.cs | 2 +- .../Exceptions/ExceptionResponse.cs | 2 +- .../Exceptions/NotFoundException.cs | 2 +- .../Exceptions/UnauthorizedUserException.cs | 2 +- .../Extensions/StrignExtensions.cs | 2 +- .../Implementation/CustomerService.cs | 16 +- .../Implementation/UserService.cs | 26 +- Orion.Domain/Interfaces/ICustomerService.cs | 13 + .../Interfaces/IUserService.cs | 10 +- Orion.Domain/Orion.Domain.csproj | 12 + .../Base/IBaseEntityRepository.cs | 2 +- .../Repositories/ICustomerRepository.cs | 13 + .../Repositories/IRefreshTokenRepository.cs | 10 + .../Repositories/IUserRepository.cs | 10 +- .../UnitOfWork/IUnitOfWorkEntity.cs | 2 +- .../Domain/BaseEntity.cs | 2 +- .../Domain/Customer.cs | 2 +- .../Domain/RefreshToken.cs | 2 +- .../Domain/User.cs | 4 +- .../Enuns/UserProfile.cs | 2 +- .../Filter/BaseFilter.cs | 2 +- Orion.Entities/Filter/CustomerFilter.cs | 9 + Orion.Entities/Filter/UserFilter.cs | 9 + .../Orion.Entities.csproj | 0 .../ValueObjects/Pagination/PagedList.cs | 4 +- .../DependenciesInjectionConfiguration.cs | 12 +- Orion.Ioc/Orion.Ioc.csproj | 14 + .../ISharedResource.cs | 2 +- .../Messages/MessagesKeys.cs | 2 +- .../Orion.Resources.csproj | 6 +- .../OrionResources.cs | 8 +- .../Resources/OrionResources.en-US.resx | 2 +- .../Resources/OrionResources.pt-BR.resx | 2 +- .../API/HealthCheckApiTest.cs | 8 +- .../Configuration/ApiTestInitializer.cs | 15 +- .../DependencyInjectionSetupFixture.cs | 10 +- .../Configuration/TestBoostrapper.cs | 6 +- .../Controllers/AuthControllerTest.cs | 28 +- .../BaseController/BaseControllerTest.cs | 10 +- .../Controllers/CustomersControllerTest.cs | 22 +- .../Controllers/UsersControllerTest.cs | 22 +- .../MotherObjects/CustomerMotherObject.cs | 6 +- .../MotherObjects/RefreshTokenMotherObject.cs | 8 +- .../MotherObjects/UserMotherObject.cs | 10 +- .../Orion.Test.csproj | 14 +- .../Services/BaseService/BaseServiceTest.cs | 16 ++ Orion.Test/Services/CustomerServiceTest.cs | 132 +++++++++ Orion.Test/Services/UserServiceTest.cs | 265 ++++++++++++++++++ VBaseProject.sln => Orion.sln | 14 +- README.md | 4 +- .../Interfaces/ICustomerService.cs | 13 - .../Repositories/ICustomerRepository.cs | 13 - .../Repositories/IRefreshTokenRepository.cs | 10 - .../VBaseProject.Domain.csproj | 12 - .../Filter/CustomerFilter.cs | 9 - VBaseProject.Entities/Filter/UserFilter.cs | 9 - VBaseProject.Ioc/VBaseProject.Ioc.csproj | 14 - .../Services/BaseService/BaseServiceTest.cs | 16 -- .../Services/CustomerServiceTest.cs | 132 --------- VBaseProject.Test/Services/UserServiceTest.cs | 265 ------------------ azure-pipelines.yml | 6 +- docker-compose.yaml | 2 +- 110 files changed, 835 insertions(+), 845 deletions(-) rename {VBaseProject.Api => Orion.Api}/Attributes/AuthorizeForAttribute.cs (86%) rename {VBaseProject.Api => Orion.Api}/AutoMapper/Config/DomainToOutputProfile.cs (71%) rename {VBaseProject.Api => Orion.Api}/AutoMapper/Config/InputToDomainProfile.cs (83%) rename {VBaseProject.Api => Orion.Api}/AutoMapper/Input/CustomerInput.cs (75%) rename {VBaseProject.Api => Orion.Api}/AutoMapper/Input/UserInput.cs (77%) rename {VBaseProject.Api => Orion.Api}/AutoMapper/Output/CustomerOutput.cs (84%) rename {VBaseProject.Api => Orion.Api}/AutoMapper/Output/UserOutput.cs (75%) rename {VBaseProject.Api => Orion.Api}/Controllers/ApiController.cs (80%) rename {VBaseProject.Api => Orion.Api}/Controllers/AuthController.cs (86%) rename {VBaseProject.Api => Orion.Api}/Controllers/CustomersController.cs (74%) rename {VBaseProject.Api => Orion.Api}/Controllers/UsersController.cs (75%) rename {VBaseProject.Api => Orion.Api}/Jwt/JwtConfiguration.cs (88%) rename VBaseProject.Api/Middleware/VBaseProjectMiddleware.cs => Orion.Api/Middleware/OrionMiddleware.cs (90%) rename {VBaseProject.Api => Orion.Api}/Models/AuthUserModel.cs (86%) rename {VBaseProject.Api => Orion.Api}/Models/RefreshTokenModel.cs (59%) rename {VBaseProject.Api => Orion.Api}/Models/UserApiTokenModel.cs (79%) rename {VBaseProject.Api => Orion.Api}/Models/UserLoginModel.cs (87%) rename VBaseProject.Api/VBaseProject.Api.csproj => Orion.Api/Orion.Api.csproj (86%) rename {VBaseProject.Api => Orion.Api}/Program.cs (85%) rename {VBaseProject.Api => Orion.Api}/Properties/launchSettings.json (52%) rename {VBaseProject.Api => Orion.Api}/Startup.cs (92%) rename {VBaseProject.Api => Orion.Api}/ValidateModelStateAttribute .cs (93%) rename {VBaseProject.Api => Orion.Api}/Validators/CustomerValidator.cs (66%) rename {VBaseProject.Api => Orion.Api}/appsettings.Development.json (84%) rename {VBaseProject.Api => Orion.Api}/appsettings.Production.json (84%) rename {VBaseProject.Api => Orion.Api}/appsettings.Test.json (84%) rename {VBaseProject.Api => Orion.Api}/appsettings.json (100%) rename {VBaseProject.Api => Orion.Api}/nlog.config (100%) rename {VBaseProject.Data => Orion.Data}/Context/DataContext.cs (92%) rename {VBaseProject.Data => Orion.Data}/Mapping/CustomerMapping.cs (86%) rename {VBaseProject.Data => Orion.Data}/Mapping/RefreshTokenMapping.cs (89%) rename {VBaseProject.Data => Orion.Data}/Mapping/UserMapping.cs (92%) rename {VBaseProject.Data => Orion.Data}/Migrations/20210311124539_Initial.Designer.cs (93%) rename {VBaseProject.Data => Orion.Data}/Migrations/20210311124539_Initial.cs (98%) rename {VBaseProject.Data => Orion.Data}/Migrations/20210313163754_ChangeRefreshTokenSize.Designer.cs (94%) rename {VBaseProject.Data => Orion.Data}/Migrations/20210313163754_ChangeRefreshTokenSize.cs (97%) rename {VBaseProject.Data => Orion.Data}/Migrations/DataContextModelSnapshot.cs (93%) rename VBaseProject.Data/VBaseProject.Data.csproj => Orion.Data/Orion.Data.csproj (79%) rename {VBaseProject.Data => Orion.Data}/Repository/Generic/BaseEntityRepository.cs (92%) rename {VBaseProject.Data => Orion.Data}/Repository/Generic/IBaseEntityRepository.cs (89%) rename {VBaseProject.Data => Orion.Data}/Repository/Implementations/CustomerRepository.cs (75%) rename {VBaseProject.Data => Orion.Data}/Repository/Implementations/RefreshTokenRepository.cs (50%) rename {VBaseProject.Data => Orion.Data}/Repository/Implementations/UserRepository.cs (83%) rename {VBaseProject.Data => Orion.Data}/UnitOfWork/UnitOfWorkEntity.cs (90%) rename {VBaseProject.Domain => Orion.Domain}/Authentication/AuthenticationConfiguration.cs (83%) rename {VBaseProject.Domain => Orion.Domain}/Base/IBaseService.cs (88%) rename {VBaseProject.Domain => Orion.Domain}/Exceptions/BusinessException.cs (89%) rename {VBaseProject.Domain => Orion.Domain}/Exceptions/ConflictException.cs (83%) rename {VBaseProject.Domain => Orion.Domain}/Exceptions/ExceptionResponse.cs (92%) rename {VBaseProject.Domain => Orion.Domain}/Exceptions/NotFoundException.cs (89%) rename {VBaseProject.Domain => Orion.Domain}/Exceptions/UnauthorizedUserException.cs (84%) rename {VBaseProject.Domain => Orion.Domain}/Extensions/StrignExtensions.cs (93%) rename {VBaseProject.Domain => Orion.Domain}/Implementation/CustomerService.cs (84%) rename {VBaseProject.Domain => Orion.Domain}/Implementation/UserService.cs (88%) create mode 100644 Orion.Domain/Interfaces/ICustomerService.cs rename {VBaseProject.Domain => Orion.Domain}/Interfaces/IUserService.cs (64%) create mode 100644 Orion.Domain/Orion.Domain.csproj rename {VBaseProject.Domain => Orion.Domain}/Repositories/Base/IBaseEntityRepository.cs (89%) create mode 100644 Orion.Domain/Repositories/ICustomerRepository.cs create mode 100644 Orion.Domain/Repositories/IRefreshTokenRepository.cs rename {VBaseProject.Domain => Orion.Domain}/Repositories/IUserRepository.cs (57%) rename {VBaseProject.Domain => Orion.Domain}/Repositories/UnitOfWork/IUnitOfWorkEntity.cs (85%) rename {VBaseProject.Entities => Orion.Entities}/Domain/BaseEntity.cs (84%) rename {VBaseProject.Entities => Orion.Entities}/Domain/Customer.cs (78%) rename {VBaseProject.Entities => Orion.Entities}/Domain/RefreshToken.cs (79%) rename {VBaseProject.Entities => Orion.Entities}/Domain/User.cs (78%) rename {VBaseProject.Entities => Orion.Entities}/Enuns/UserProfile.cs (68%) rename {VBaseProject.Entities => Orion.Entities}/Filter/BaseFilter.cs (84%) create mode 100644 Orion.Entities/Filter/CustomerFilter.cs create mode 100644 Orion.Entities/Filter/UserFilter.cs rename VBaseProject.Entities/VBaseProject.Entities.csproj => Orion.Entities/Orion.Entities.csproj (100%) rename {VBaseProject.Entities => Orion.Entities}/ValueObjects/Pagination/PagedList.cs (73%) rename {VBaseProject.Ioc => Orion.Ioc}/Dependencies/DependenciesInjectionConfiguration.cs (71%) create mode 100644 Orion.Ioc/Orion.Ioc.csproj rename {VBaseProject.Resources => Orion.Resources}/ISharedResource.cs (59%) rename {VBaseProject.Resources => Orion.Resources}/Messages/MessagesKeys.cs (95%) rename VBaseProject.Resources/VBaseProject.Resources.csproj => Orion.Resources/Orion.Resources.csproj (79%) rename VBaseProject.Resources/VBaseProjectResources.cs => Orion.Resources/OrionResources.cs (55%) rename VBaseProject.Resources/Resources/VBaseProjectResources.en-US.resx => Orion.Resources/Resources/OrionResources.en-US.resx (99%) rename VBaseProject.Resources/Resources/VBaseProjectResources.pt-BR.resx => Orion.Resources/Resources/OrionResources.pt-BR.resx (99%) rename {VBaseProject.Test => Orion.Test}/API/HealthCheckApiTest.cs (74%) rename {VBaseProject.Test => Orion.Test}/Configuration/ApiTestInitializer.cs (71%) rename {VBaseProject.Test => Orion.Test}/Configuration/DependencyInjectionSetupFixture.cs (75%) rename {VBaseProject.Test => Orion.Test}/Configuration/TestBoostrapper.cs (77%) rename {VBaseProject.Test => Orion.Test}/Controllers/AuthControllerTest.cs (84%) rename {VBaseProject.Test => Orion.Test}/Controllers/BaseController/BaseControllerTest.cs (64%) rename {VBaseProject.Test => Orion.Test}/Controllers/CustomersControllerTest.cs (89%) rename {VBaseProject.Test => Orion.Test}/Controllers/UsersControllerTest.cs (89%) rename {VBaseProject.Test => Orion.Test}/MotherObjects/CustomerMotherObject.cs (82%) rename {VBaseProject.Test => Orion.Test}/MotherObjects/RefreshTokenMotherObject.cs (84%) rename {VBaseProject.Test => Orion.Test}/MotherObjects/UserMotherObject.cs (86%) rename VBaseProject.Test/VBaseProject.Test.csproj => Orion.Test/Orion.Test.csproj (72%) create mode 100644 Orion.Test/Services/BaseService/BaseServiceTest.cs create mode 100644 Orion.Test/Services/CustomerServiceTest.cs create mode 100644 Orion.Test/Services/UserServiceTest.cs rename VBaseProject.sln => Orion.sln (81%) delete mode 100644 VBaseProject.Domain/Interfaces/ICustomerService.cs delete mode 100644 VBaseProject.Domain/Repositories/ICustomerRepository.cs delete mode 100644 VBaseProject.Domain/Repositories/IRefreshTokenRepository.cs delete mode 100644 VBaseProject.Domain/VBaseProject.Domain.csproj delete mode 100644 VBaseProject.Entities/Filter/CustomerFilter.cs delete mode 100644 VBaseProject.Entities/Filter/UserFilter.cs delete mode 100644 VBaseProject.Ioc/VBaseProject.Ioc.csproj delete mode 100644 VBaseProject.Test/Services/BaseService/BaseServiceTest.cs delete mode 100644 VBaseProject.Test/Services/CustomerServiceTest.cs delete mode 100644 VBaseProject.Test/Services/UserServiceTest.cs diff --git a/Dockerfile b/Dockerfile index d011c25..2afb590 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,9 @@ WORKDIR /app COPY . . -RUN dotnet restore "VBaseProject.Api/VBaseProject.Api.csproj" -RUN dotnet publish "VBaseProject.Api/VBaseProject.Api.csproj" -c Release -o /out +RUN dotnet restore "Orion.Api/Orion.Api.csproj" +RUN dotnet publish "Orion.Api/Orion.Api.csproj" -c Release -o /out WORKDIR /out -ENTRYPOINT ["dotnet", "VBaseProject.Api.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "Orion.Api.dll"] \ No newline at end of file diff --git a/VBaseProject.Api/Attributes/AuthorizeForAttribute.cs b/Orion.Api/Attributes/AuthorizeForAttribute.cs similarity index 86% rename from VBaseProject.Api/Attributes/AuthorizeForAttribute.cs rename to Orion.Api/Attributes/AuthorizeForAttribute.cs index bea4291..2380539 100644 --- a/VBaseProject.Api/Attributes/AuthorizeForAttribute.cs +++ b/Orion.Api/Attributes/AuthorizeForAttribute.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Authorization; -namespace VBaseProject.Api.Attributes +namespace Orion.Api.Attributes { public class AuthorizeForAttribute : AuthorizeAttribute { diff --git a/VBaseProject.Api/AutoMapper/Config/DomainToOutputProfile.cs b/Orion.Api/AutoMapper/Config/DomainToOutputProfile.cs similarity index 71% rename from VBaseProject.Api/AutoMapper/Config/DomainToOutputProfile.cs rename to Orion.Api/AutoMapper/Config/DomainToOutputProfile.cs index 3ebf872..4184317 100644 --- a/VBaseProject.Api/AutoMapper/Config/DomainToOutputProfile.cs +++ b/Orion.Api/AutoMapper/Config/DomainToOutputProfile.cs @@ -1,9 +1,9 @@ using AutoMapper; -using VBaseProject.Api.AutoMapper.Output; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.ValueObjects.Pagination; +using Orion.Api.AutoMapper.Output; +using Orion.Entities.Domain; +using Orion.Entities.ValueObjects.Pagination; -namespace VBaseProject.Api.AutoMapper.Config +namespace Orion.Api.AutoMapper.Config { public class DomainToOutputProfile : Profile { diff --git a/VBaseProject.Api/AutoMapper/Config/InputToDomainProfile.cs b/Orion.Api/AutoMapper/Config/InputToDomainProfile.cs similarity index 83% rename from VBaseProject.Api/AutoMapper/Config/InputToDomainProfile.cs rename to Orion.Api/AutoMapper/Config/InputToDomainProfile.cs index cb10dd2..3236222 100644 --- a/VBaseProject.Api/AutoMapper/Config/InputToDomainProfile.cs +++ b/Orion.Api/AutoMapper/Config/InputToDomainProfile.cs @@ -1,8 +1,8 @@ using AutoMapper; -using VBaseProject.Api.AutoMapper.Input; -using VBaseProject.Entities.Domain; +using Orion.Api.AutoMapper.Input; +using Orion.Entities.Domain; -namespace VBaseProject.Api.AutoMapper.Config +namespace Orion.Api.AutoMapper.Config { public class InputToDomainProfile : Profile { diff --git a/VBaseProject.Api/AutoMapper/Input/CustomerInput.cs b/Orion.Api/AutoMapper/Input/CustomerInput.cs similarity index 75% rename from VBaseProject.Api/AutoMapper/Input/CustomerInput.cs rename to Orion.Api/AutoMapper/Input/CustomerInput.cs index f3a717d..6e6de53 100644 --- a/VBaseProject.Api/AutoMapper/Input/CustomerInput.cs +++ b/Orion.Api/AutoMapper/Input/CustomerInput.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Api.AutoMapper.Input +namespace Orion.Api.AutoMapper.Input { public class CustomerInput { diff --git a/VBaseProject.Api/AutoMapper/Input/UserInput.cs b/Orion.Api/AutoMapper/Input/UserInput.cs similarity index 77% rename from VBaseProject.Api/AutoMapper/Input/UserInput.cs rename to Orion.Api/AutoMapper/Input/UserInput.cs index 35fbd8d..19060f9 100644 --- a/VBaseProject.Api/AutoMapper/Input/UserInput.cs +++ b/Orion.Api/AutoMapper/Input/UserInput.cs @@ -1,6 +1,6 @@ -using VBaseProject.Entities.Enuns; +using Orion.Entities.Enuns; -namespace VBaseProject.Api.AutoMapper.Input +namespace Orion.Api.AutoMapper.Input { public class UserInput { diff --git a/VBaseProject.Api/AutoMapper/Output/CustomerOutput.cs b/Orion.Api/AutoMapper/Output/CustomerOutput.cs similarity index 84% rename from VBaseProject.Api/AutoMapper/Output/CustomerOutput.cs rename to Orion.Api/AutoMapper/Output/CustomerOutput.cs index 36830f6..f7fdd94 100644 --- a/VBaseProject.Api/AutoMapper/Output/CustomerOutput.cs +++ b/Orion.Api/AutoMapper/Output/CustomerOutput.cs @@ -1,6 +1,6 @@ using System; -namespace VBaseProject.Api.AutoMapper.Output +namespace Orion.Api.AutoMapper.Output { public class CustomerOutput { diff --git a/VBaseProject.Api/AutoMapper/Output/UserOutput.cs b/Orion.Api/AutoMapper/Output/UserOutput.cs similarity index 75% rename from VBaseProject.Api/AutoMapper/Output/UserOutput.cs rename to Orion.Api/AutoMapper/Output/UserOutput.cs index aa38598..f49ff6b 100644 --- a/VBaseProject.Api/AutoMapper/Output/UserOutput.cs +++ b/Orion.Api/AutoMapper/Output/UserOutput.cs @@ -1,8 +1,8 @@ -using VBaseProject.Entities.Enuns; -using VBaseProject.Domain.Authentication; +using Orion.Entities.Enuns; +using Orion.Domain.Authentication; -namespace VBaseProject.Api.AutoMapper.Output +namespace Orion.Api.AutoMapper.Output { public class UserOutput { diff --git a/VBaseProject.Api/Controllers/ApiController.cs b/Orion.Api/Controllers/ApiController.cs similarity index 80% rename from VBaseProject.Api/Controllers/ApiController.cs rename to Orion.Api/Controllers/ApiController.cs index 517776e..639d047 100644 --- a/VBaseProject.Api/Controllers/ApiController.cs +++ b/Orion.Api/Controllers/ApiController.cs @@ -1,19 +1,19 @@ using AutoMapper; using Microsoft.AspNetCore.Mvc; using System.Security.Claims; -using VBaseProject.Api.Models; +using Orion.Api.Models; -namespace VBaseProject.Api.Controllers +namespace Orion.Api.Controllers { [ApiController] public abstract class ApiController : ControllerBase { - protected readonly IMapper _mapper; + protected readonly IMapper Mapper; protected AuthUserModel AuthUser => GetAuthenticatedUser(); protected ApiController(IMapper mapper) { - _mapper = mapper; - _mapper.ConfigurationProvider.AssertConfigurationIsValid(); + Mapper = mapper; + Mapper.ConfigurationProvider.AssertConfigurationIsValid(); } private AuthUserModel GetAuthenticatedUser() diff --git a/VBaseProject.Api/Controllers/AuthController.cs b/Orion.Api/Controllers/AuthController.cs similarity index 86% rename from VBaseProject.Api/Controllers/AuthController.cs rename to Orion.Api/Controllers/AuthController.cs index e9fc70a..5a747eb 100644 --- a/VBaseProject.Api/Controllers/AuthController.cs +++ b/Orion.Api/Controllers/AuthController.cs @@ -8,14 +8,14 @@ using System.Security.Claims; using System.Text; using System.Threading.Tasks; -using VBaseProject.Api.AutoMapper.Output; -using VBaseProject.Api.Jwt; -using VBaseProject.Api.Models; -using VBaseProject.Domain.Extensions; -using VBaseProject.Domain.Interfaces; -using VBaseProject.Entities.Domain; +using Orion.Api.AutoMapper.Output; +using Orion.Api.Jwt; +using Orion.Api.Models; +using Orion.Domain.Extensions; +using Orion.Domain.Interfaces; +using Orion.Entities.Domain; -namespace VBaseProject.Api.Controllers +namespace Orion.Api.Controllers { [Route("api/[controller]")] [ApiController] @@ -35,7 +35,7 @@ public AuthController(IUserService userService, IMapper mapper, IConfiguration c [HttpPost] public async Task Login([FromBody] UserLoginModel model) { - var userOutput = _mapper.Map(await _userService.LoginAsync(model.Email, model.Password)); + var userOutput = Mapper.Map(await _userService.LoginAsync(model.Email, model.Password)); return await AuthorizeUser(userOutput); } @@ -45,7 +45,7 @@ public async Task Login([FromBody] UserLoginModel model) [HttpPost] public async Task RefreshToken([FromBody] RefreshTokenModel refreshTokenModel) { - var userOutput = _mapper.Map(await _userService.GetUserByRefreshToken(refreshTokenModel.RefreshToken)); + var userOutput = Mapper.Map(await _userService.GetUserByRefreshToken(refreshTokenModel.RefreshToken)); return await AuthorizeUser(userOutput); } diff --git a/VBaseProject.Api/Controllers/CustomersController.cs b/Orion.Api/Controllers/CustomersController.cs similarity index 74% rename from VBaseProject.Api/Controllers/CustomersController.cs rename to Orion.Api/Controllers/CustomersController.cs index a166e75..614348f 100644 --- a/VBaseProject.Api/Controllers/CustomersController.cs +++ b/Orion.Api/Controllers/CustomersController.cs @@ -2,16 +2,16 @@ using Microsoft.AspNetCore.Mvc; using System.Net; using System.Threading.Tasks; -using VBaseProject.Api.Attributes; -using VBaseProject.Api.AutoMapper.Input; -using VBaseProject.Api.AutoMapper.Output; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Filter; -using VBaseProject.Entities.ValueObjects.Pagination; -using VBaseProject.Domain.Interfaces; -using static VBaseProject.Domain.Authentication.AuthorizationConfiguration; +using Orion.Api.Attributes; +using Orion.Api.AutoMapper.Input; +using Orion.Api.AutoMapper.Output; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; +using Orion.Domain.Interfaces; +using static Orion.Domain.Authentication.AuthorizationConfiguration; -namespace VBaseProject.Api.Controllers +namespace Orion.Api.Controllers { [ApiVersion("1.0")] [Route("api/[controller]")] @@ -32,7 +32,7 @@ public async Task Get([FromQuery] CustomerFilter filter) { var customer = await _customerService.ListPaginate(filter); - var customerOutputList = _mapper.Map>(customer); + var customerOutputList = Mapper.Map>(customer); return Ok(customerOutputList); } @@ -43,7 +43,7 @@ public async Task Get([FromQuery] CustomerFilter filter) public async Task Get(string id) { var customer = await _customerService.FindByIdAsync(id); - var customerOutput = _mapper.Map(customer); + var customerOutput = Mapper.Map(customer); return Ok(customerOutput); } @@ -53,11 +53,11 @@ public async Task Get(string id) [ProducesResponseType((int)HttpStatusCode.BadRequest)] public async Task Post([FromBody] CustomerInput customerInput) { - var customer = _mapper.Map(customerInput); + var customer = Mapper.Map(customerInput); var created = await _customerService.AddAsync(customer); - return Created(_mapper.Map(created)); + return Created(Mapper.Map(created)); } [HttpPut("{id}")] @@ -67,7 +67,7 @@ public async Task Post([FromBody] CustomerInput customerInput) public async Task Put(string id, [FromBody] CustomerInput customerInput) { customerInput.PublicId = id; - var customer = _mapper.Map(customerInput); + var customer = Mapper.Map(customerInput); await _customerService.UpdateAsync(customer); diff --git a/VBaseProject.Api/Controllers/UsersController.cs b/Orion.Api/Controllers/UsersController.cs similarity index 75% rename from VBaseProject.Api/Controllers/UsersController.cs rename to Orion.Api/Controllers/UsersController.cs index 35b70c7..d73f464 100644 --- a/VBaseProject.Api/Controllers/UsersController.cs +++ b/Orion.Api/Controllers/UsersController.cs @@ -2,16 +2,16 @@ using Microsoft.AspNetCore.Mvc; using System.Net; using System.Threading.Tasks; -using VBaseProject.Api.Attributes; -using VBaseProject.Api.AutoMapper.Input; -using VBaseProject.Api.AutoMapper.Output; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Filter; -using VBaseProject.Entities.ValueObjects.Pagination; -using VBaseProject.Domain.Interfaces; -using static VBaseProject.Domain.Authentication.AuthorizationConfiguration; +using Orion.Api.Attributes; +using Orion.Api.AutoMapper.Input; +using Orion.Api.AutoMapper.Output; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; +using Orion.Domain.Interfaces; +using static Orion.Domain.Authentication.AuthorizationConfiguration; -namespace VBaseProject.Api.Controllers +namespace Orion.Api.Controllers { [ApiVersion("1.0")] [Route("api/[controller]")] @@ -32,7 +32,7 @@ public async Task Get([FromQuery] UserFilter filter) { var user = await _userService.ListPaginate(filter); - var userOutputList = _mapper.Map>(user); + var userOutputList = Mapper.Map>(user); return Ok(userOutputList); } @@ -43,7 +43,7 @@ public async Task Get([FromQuery] UserFilter filter) public async Task Get(string id) { var user = await _userService.FindByIdAsync(id); - var userOutput = _mapper.Map(user); + var userOutput = Mapper.Map(user); return Ok(userOutput); } @@ -53,11 +53,11 @@ public async Task Get(string id) [ProducesResponseType((int)HttpStatusCode.BadRequest)] public async Task Post([FromBody] UserInput userInput) { - var user = _mapper.Map(userInput); + var user = Mapper.Map(userInput); var created = await _userService.AddAsync(user); - return Created(_mapper.Map(created)); + return Created(Mapper.Map(created)); } [HttpPut("{id}")] @@ -67,7 +67,7 @@ public async Task Post([FromBody] UserInput userInput) public async Task Put(string id, [FromBody] UserInput userInput) { userInput.PublicId = id; - var user = _mapper.Map(userInput); + var user = Mapper.Map(userInput); await _userService.UpdateAsync(user); diff --git a/VBaseProject.Api/Jwt/JwtConfiguration.cs b/Orion.Api/Jwt/JwtConfiguration.cs similarity index 88% rename from VBaseProject.Api/Jwt/JwtConfiguration.cs rename to Orion.Api/Jwt/JwtConfiguration.cs index 1d3cf67..dbc1141 100644 --- a/VBaseProject.Api/Jwt/JwtConfiguration.cs +++ b/Orion.Api/Jwt/JwtConfiguration.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Api.Jwt +namespace Orion.Api.Jwt { public class JwtConfiguration { diff --git a/VBaseProject.Api/Middleware/VBaseProjectMiddleware.cs b/Orion.Api/Middleware/OrionMiddleware.cs similarity index 90% rename from VBaseProject.Api/Middleware/VBaseProjectMiddleware.cs rename to Orion.Api/Middleware/OrionMiddleware.cs index 4925864..0978971 100644 --- a/VBaseProject.Api/Middleware/VBaseProjectMiddleware.cs +++ b/Orion.Api/Middleware/OrionMiddleware.cs @@ -6,24 +6,24 @@ using System; using System.Net; using System.Threading.Tasks; -using VBaseProject.Domain.Exceptions; +using Orion.Domain.Exceptions; -namespace VBaseProject.Api.Middleware +namespace Orion.Api.Middleware { - public class VBaseProjectMiddleware + public class OrionMiddleware { private readonly RequestDelegate _next; private readonly ILoggerFactory _loggerFactory; private readonly ILogger _logger; private readonly IHostEnvironment _env; - public VBaseProjectMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IHostEnvironment env) + public OrionMiddleware(RequestDelegate next, ILoggerFactory loggerFactory, IHostEnvironment env) { _env = env; _loggerFactory = loggerFactory; _next = next; - _logger = _loggerFactory.CreateLogger(); + _logger = _loggerFactory.CreateLogger(); } public async Task Invoke(HttpContext context) diff --git a/VBaseProject.Api/Models/AuthUserModel.cs b/Orion.Api/Models/AuthUserModel.cs similarity index 86% rename from VBaseProject.Api/Models/AuthUserModel.cs rename to Orion.Api/Models/AuthUserModel.cs index da81c6a..31e4c6f 100644 --- a/VBaseProject.Api/Models/AuthUserModel.cs +++ b/Orion.Api/Models/AuthUserModel.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Api.Models +namespace Orion.Api.Models { public class AuthUserModel { diff --git a/VBaseProject.Api/Models/RefreshTokenModel.cs b/Orion.Api/Models/RefreshTokenModel.cs similarity index 59% rename from VBaseProject.Api/Models/RefreshTokenModel.cs rename to Orion.Api/Models/RefreshTokenModel.cs index bd533db..4c76112 100644 --- a/VBaseProject.Api/Models/RefreshTokenModel.cs +++ b/Orion.Api/Models/RefreshTokenModel.cs @@ -1,6 +1,6 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; -namespace VBaseProject.Api.Models +namespace Orion.Api.Models { public class RefreshTokenModel { diff --git a/VBaseProject.Api/Models/UserApiTokenModel.cs b/Orion.Api/Models/UserApiTokenModel.cs similarity index 79% rename from VBaseProject.Api/Models/UserApiTokenModel.cs rename to Orion.Api/Models/UserApiTokenModel.cs index 3dc77cb..b507946 100644 --- a/VBaseProject.Api/Models/UserApiTokenModel.cs +++ b/Orion.Api/Models/UserApiTokenModel.cs @@ -1,6 +1,6 @@ -using System; +using System; -namespace VBaseProject.Api.Models +namespace Orion.Api.Models { public class UserApiTokenModel { diff --git a/VBaseProject.Api/Models/UserLoginModel.cs b/Orion.Api/Models/UserLoginModel.cs similarity index 87% rename from VBaseProject.Api/Models/UserLoginModel.cs rename to Orion.Api/Models/UserLoginModel.cs index 45ff489..e9158f1 100644 --- a/VBaseProject.Api/Models/UserLoginModel.cs +++ b/Orion.Api/Models/UserLoginModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace VBaseProject.Api.Models +namespace Orion.Api.Models { public class UserLoginModel { diff --git a/VBaseProject.Api/VBaseProject.Api.csproj b/Orion.Api/Orion.Api.csproj similarity index 86% rename from VBaseProject.Api/VBaseProject.Api.csproj rename to Orion.Api/Orion.Api.csproj index 128fe8b..d8ab5a2 100644 --- a/VBaseProject.Api/VBaseProject.Api.csproj +++ b/Orion.Api/Orion.Api.csproj @@ -1,8 +1,8 @@ - + net7.0 - VBaseProject.Api + Orion.Api 7401dc57-e892-498d-a628-03091ec95c6a Linux @@ -34,10 +34,10 @@ - - - - + + + + diff --git a/VBaseProject.Api/Program.cs b/Orion.Api/Program.cs similarity index 85% rename from VBaseProject.Api/Program.cs rename to Orion.Api/Program.cs index 4c54ea4..4d59f9e 100644 --- a/VBaseProject.Api/Program.cs +++ b/Orion.Api/Program.cs @@ -1,12 +1,11 @@ +using System; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using NLog; using NLog.Web; -using System; -namespace VBaseProject +namespace Orion.Api { public static class Program { @@ -29,9 +28,8 @@ public static void Main(string[] args) } } - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + private static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) - .UseUrls("http://*:5000") .UseStartup() .UseIISIntegration() .ConfigureLogging((context, logging) => diff --git a/VBaseProject.Api/Properties/launchSettings.json b/Orion.Api/Properties/launchSettings.json similarity index 52% rename from VBaseProject.Api/Properties/launchSettings.json rename to Orion.Api/Properties/launchSettings.json index f25634f..f643621 100644 --- a/VBaseProject.Api/Properties/launchSettings.json +++ b/Orion.Api/Properties/launchSettings.json @@ -1,13 +1,4 @@ { - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://127.0.0.1:5000", - "sslPort": 0 - } - }, - "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { "Dev": { "commandName": "Project", @@ -16,7 +7,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, - "applicationUrl": "http://127.0.0.1:5000" + "applicationUrl": "http://localhost:5100" }, "Test": { "commandName": "Project", @@ -24,7 +15,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Test" }, - "applicationUrl": "http://127.0.0.1:5000" + "applicationUrl": "http://localhost:5100" }, "Production": { "commandName": "Project", @@ -34,12 +25,7 @@ "ASPNETCORE_ENVIRONMENT": "Production" }, "sqlDebugging": false, - "applicationUrl": "http://127.0.0.1:5000" - }, - "Docker": { - "commandName": "Docker", - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger", - "publishAllPorts": true + "applicationUrl": "http://localhost:5100" } } } \ No newline at end of file diff --git a/VBaseProject.Api/Startup.cs b/Orion.Api/Startup.cs similarity index 92% rename from VBaseProject.Api/Startup.cs rename to Orion.Api/Startup.cs index 93bfeba..723bfc8 100644 --- a/VBaseProject.Api/Startup.cs +++ b/Orion.Api/Startup.cs @@ -1,3 +1,7 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; using AutoMapper; using FluentValidation; using FluentValidation.AspNetCore; @@ -15,23 +19,19 @@ using Microsoft.Extensions.Logging; using Microsoft.IdentityModel.Tokens; using Microsoft.OpenApi.Models; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Text; -using VBaseProject.Api.AutoMapper.Config; -using VBaseProject.Api.Jwt; -using VBaseProject.Api.Middleware; -using VBaseProject.Api.Validators; -using VBaseProject.Ioc.Dependencies; +using Orion.Api.AutoMapper.Config; +using Orion.Api.Jwt; +using Orion.Api.Middleware; +using Orion.Api.Validators; +using Orion.Ioc.Dependencies; -namespace VBaseProject +namespace Orion.Api { public class Startup { private readonly ILoggerFactory _loggerFactory; private readonly IWebHostEnvironment _env; - public IConfiguration Configuration { get; set; } + private IConfiguration Configuration { get; set; } public Startup(IConfiguration configuration, IWebHostEnvironment env, ILoggerFactory loggerFactory) { @@ -87,8 +87,8 @@ private static void ConfigureSwagger(IServiceCollection services) c.SwaggerDoc("v1", new OpenApiInfo { Version = "v1", - Title = "VBase Project API", - Description = "VBase Project - API Description Here!" + Title = "Orion API", + Description = "Orion - API Description Here!" }); c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme @@ -165,12 +165,12 @@ public void ConfigureMapper(IServiceCollection services) mc.AddProfile(new DomainToOutputProfile()); }); - services.AddScoped(_ => { return mappingConfig.CreateMapper(); }); + services.AddScoped(_ => mappingConfig.CreateMapper()); } public void Configure(IApplicationBuilder app, IHostEnvironment env) { - ILogger logger = _loggerFactory.CreateLogger(); + var logger = _loggerFactory.CreateLogger(); //ENVIRONMENT if (env.IsDevelopment()) @@ -182,7 +182,7 @@ public void Configure(IApplicationBuilder app, IHostEnvironment env) logger.LogInformation("Environment: {Env}", _env.EnvironmentName); app.UseHsts(); } - app.UseMiddleware(); + app.UseMiddleware(); //SWAGGER app.UseSwagger(); @@ -221,8 +221,13 @@ public void Configure(IApplicationBuilder app, IHostEnvironment env) private static void ConfigureGlobalization(IApplicationBuilder app) { - var defaultCultureInfo = new CultureInfo("pt-BR"); - defaultCultureInfo.NumberFormat.CurrencySymbol = "R$"; + var defaultCultureInfo = new CultureInfo("pt-BR") + { + NumberFormat = + { + CurrencySymbol = "R$" + } + }; var supportedCultures = new List { diff --git a/VBaseProject.Api/ValidateModelStateAttribute .cs b/Orion.Api/ValidateModelStateAttribute .cs similarity index 93% rename from VBaseProject.Api/ValidateModelStateAttribute .cs rename to Orion.Api/ValidateModelStateAttribute .cs index 7727e05..4b310b5 100644 --- a/VBaseProject.Api/ValidateModelStateAttribute .cs +++ b/Orion.Api/ValidateModelStateAttribute .cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; -namespace VBaseProject.Api +namespace Orion.Api { public class ValidateModelStateAttribute : ActionFilterAttribute { diff --git a/VBaseProject.Api/Validators/CustomerValidator.cs b/Orion.Api/Validators/CustomerValidator.cs similarity index 66% rename from VBaseProject.Api/Validators/CustomerValidator.cs rename to Orion.Api/Validators/CustomerValidator.cs index 0952ff4..ba0e352 100644 --- a/VBaseProject.Api/Validators/CustomerValidator.cs +++ b/Orion.Api/Validators/CustomerValidator.cs @@ -1,14 +1,14 @@ using FluentValidation; using Microsoft.Extensions.Localization; -using VBaseProject.Api.AutoMapper.Input; -using VBaseProject.Resources; -using static VBaseProject.Resources.Messages.MessagesKeys; +using Orion.Api.AutoMapper.Input; +using Orion.Resources; +using static Orion.Resources.Messages.MessagesKeys; -namespace VBaseProject.Api.Validators +namespace Orion.Api.Validators { public class CustomerValidator : AbstractValidator { - public CustomerValidator(IStringLocalizer stringLocalizer) + public CustomerValidator(IStringLocalizer stringLocalizer) { RuleFor(c => c) .NotNull() diff --git a/VBaseProject.Api/appsettings.Development.json b/Orion.Api/appsettings.Development.json similarity index 84% rename from VBaseProject.Api/appsettings.Development.json rename to Orion.Api/appsettings.Development.json index 6eaac80..c695026 100644 --- a/VBaseProject.Api/appsettings.Development.json +++ b/Orion.Api/appsettings.Development.json @@ -8,7 +8,7 @@ }, "DatabaseOptions": { - "ConnectionString": "Data Source=.\\SQLEXPRESS;Initial Catalog=VBaseProject;Integrated Security=True;Trust Server Certificate=true;MultipleActiveResultSets=True;" + "ConnectionString": "Data Source=.\\SQLEXPRESS;Initial Catalog=Orion;Integrated Security=True;Trust Server Certificate=true;MultipleActiveResultSets=True;" }, "JwtConfiguration": { diff --git a/VBaseProject.Api/appsettings.Production.json b/Orion.Api/appsettings.Production.json similarity index 84% rename from VBaseProject.Api/appsettings.Production.json rename to Orion.Api/appsettings.Production.json index 6bb7503..34d3119 100644 --- a/VBaseProject.Api/appsettings.Production.json +++ b/Orion.Api/appsettings.Production.json @@ -8,7 +8,7 @@ }, "DatabaseOptions": { - "ConnectionString": "Data Source=.\\SQLEXPRESS;Initial Catalog=VBaseProject;Integrated Security=True;Trust Server Certificate=true;MultipleActiveResultSets=True;" + "ConnectionString": "Data Source=.\\SQLEXPRESS;Initial Catalog=Orion;Integrated Security=True;Trust Server Certificate=true;MultipleActiveResultSets=True;" }, "JwtConfiguration": { diff --git a/VBaseProject.Api/appsettings.Test.json b/Orion.Api/appsettings.Test.json similarity index 84% rename from VBaseProject.Api/appsettings.Test.json rename to Orion.Api/appsettings.Test.json index 6bb7503..34d3119 100644 --- a/VBaseProject.Api/appsettings.Test.json +++ b/Orion.Api/appsettings.Test.json @@ -8,7 +8,7 @@ }, "DatabaseOptions": { - "ConnectionString": "Data Source=.\\SQLEXPRESS;Initial Catalog=VBaseProject;Integrated Security=True;Trust Server Certificate=true;MultipleActiveResultSets=True;" + "ConnectionString": "Data Source=.\\SQLEXPRESS;Initial Catalog=Orion;Integrated Security=True;Trust Server Certificate=true;MultipleActiveResultSets=True;" }, "JwtConfiguration": { diff --git a/VBaseProject.Api/appsettings.json b/Orion.Api/appsettings.json similarity index 100% rename from VBaseProject.Api/appsettings.json rename to Orion.Api/appsettings.json diff --git a/VBaseProject.Api/nlog.config b/Orion.Api/nlog.config similarity index 100% rename from VBaseProject.Api/nlog.config rename to Orion.Api/nlog.config diff --git a/VBaseProject.Data/Context/DataContext.cs b/Orion.Data/Context/DataContext.cs similarity index 92% rename from VBaseProject.Data/Context/DataContext.cs rename to Orion.Data/Context/DataContext.cs index 6c86a8f..b1e84de 100644 --- a/VBaseProject.Data/Context/DataContext.cs +++ b/Orion.Data/Context/DataContext.cs @@ -3,10 +3,10 @@ using System; using System.Linq; using System.Threading.Tasks; -using VBaseProject.Data.Mapping; -using VBaseProject.Entities.Domain; +using Orion.Data.Mapping; +using Orion.Entities.Domain; -namespace VBaseProject.Data.Context +namespace Orion.Data.Context { public class DataContext : DbContext { @@ -29,7 +29,7 @@ public DataContext(DbContextOptions options) : base(options) private static DbContextOptions GetDefaultOptions() { - var connectionString = "Data Source=.\\SQLEXPRESS;Initial Catalog=VBaseProject;Integrated Security=True;MultipleActiveResultSets=True;"; + var connectionString = "Data Source=.\\SQLEXPRESS;Initial Catalog=Orion;Integrated Security=True;MultipleActiveResultSets=True;"; return SqlServerDbContextOptionsExtensions.UseSqlServer(new DbContextOptionsBuilder(), connectionString).Options; } diff --git a/VBaseProject.Data/Mapping/CustomerMapping.cs b/Orion.Data/Mapping/CustomerMapping.cs similarity index 86% rename from VBaseProject.Data/Mapping/CustomerMapping.cs rename to Orion.Data/Mapping/CustomerMapping.cs index 711e9d7..e95b8d0 100644 --- a/VBaseProject.Data/Mapping/CustomerMapping.cs +++ b/Orion.Data/Mapping/CustomerMapping.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using VBaseProject.Entities.Domain; +using Orion.Entities.Domain; -namespace VBaseProject.Data.Mapping +namespace Orion.Data.Mapping { public class CustomerMapping : IEntityTypeConfiguration { diff --git a/VBaseProject.Data/Mapping/RefreshTokenMapping.cs b/Orion.Data/Mapping/RefreshTokenMapping.cs similarity index 89% rename from VBaseProject.Data/Mapping/RefreshTokenMapping.cs rename to Orion.Data/Mapping/RefreshTokenMapping.cs index e1c768a..9e73c37 100644 --- a/VBaseProject.Data/Mapping/RefreshTokenMapping.cs +++ b/Orion.Data/Mapping/RefreshTokenMapping.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using VBaseProject.Entities.Domain; +using Orion.Entities.Domain; -namespace VBaseProject.Data.Mapping +namespace Orion.Data.Mapping { public class RefreshTokenMapping : IEntityTypeConfiguration { diff --git a/VBaseProject.Data/Mapping/UserMapping.cs b/Orion.Data/Mapping/UserMapping.cs similarity index 92% rename from VBaseProject.Data/Mapping/UserMapping.cs rename to Orion.Data/Mapping/UserMapping.cs index 51e647d..a93b8c7 100644 --- a/VBaseProject.Data/Mapping/UserMapping.cs +++ b/Orion.Data/Mapping/UserMapping.cs @@ -1,10 +1,10 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using System; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Enuns; +using Orion.Entities.Domain; +using Orion.Entities.Enuns; -namespace VBaseProject.Data.Mapping +namespace Orion.Data.Mapping { public class UserMapping : IEntityTypeConfiguration { diff --git a/VBaseProject.Data/Migrations/20210311124539_Initial.Designer.cs b/Orion.Data/Migrations/20210311124539_Initial.Designer.cs similarity index 93% rename from VBaseProject.Data/Migrations/20210311124539_Initial.Designer.cs rename to Orion.Data/Migrations/20210311124539_Initial.Designer.cs index 599f668..18ebd60 100644 --- a/VBaseProject.Data/Migrations/20210311124539_Initial.Designer.cs +++ b/Orion.Data/Migrations/20210311124539_Initial.Designer.cs @@ -1,13 +1,13 @@ -// +// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using VBaseProject.Data.Context; +using Orion.Data.Context; -namespace VBaseProject.Data.Migrations +namespace Orion.Data.Migrations { [DbContext(typeof(DataContext))] [Migration("20210311124539_Initial")] @@ -21,7 +21,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasAnnotation("ProductVersion", "5.0.3") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("VBaseProject.Entities.Domain.Customer", b => + modelBuilder.Entity("Orion.Entities.Domain.Customer", b => { b.Property("CustomerId") .ValueGeneratedOnAdd() @@ -52,7 +52,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("Customer"); }); - modelBuilder.Entity("VBaseProject.Entities.Domain.RefreshToken", b => + modelBuilder.Entity("Orion.Entities.Domain.RefreshToken", b => { b.Property("Refreshtoken") .HasMaxLength(50) @@ -82,7 +82,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("RefreshToken"); }); - modelBuilder.Entity("VBaseProject.Entities.Domain.User", b => + modelBuilder.Entity("Orion.Entities.Domain.User", b => { b.Property("UserId") .ValueGeneratedOnAdd() diff --git a/VBaseProject.Data/Migrations/20210311124539_Initial.cs b/Orion.Data/Migrations/20210311124539_Initial.cs similarity index 98% rename from VBaseProject.Data/Migrations/20210311124539_Initial.cs rename to Orion.Data/Migrations/20210311124539_Initial.cs index bc17ce3..a6d2a24 100644 --- a/VBaseProject.Data/Migrations/20210311124539_Initial.cs +++ b/Orion.Data/Migrations/20210311124539_Initial.cs @@ -1,8 +1,8 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Diagnostics.CodeAnalysis; -namespace VBaseProject.Data.Migrations +namespace Orion.Data.Migrations { [ExcludeFromCodeCoverage] public partial class Initial : Migration diff --git a/VBaseProject.Data/Migrations/20210313163754_ChangeRefreshTokenSize.Designer.cs b/Orion.Data/Migrations/20210313163754_ChangeRefreshTokenSize.Designer.cs similarity index 94% rename from VBaseProject.Data/Migrations/20210313163754_ChangeRefreshTokenSize.Designer.cs rename to Orion.Data/Migrations/20210313163754_ChangeRefreshTokenSize.Designer.cs index 9c2a0d1..3b12c3b 100644 --- a/VBaseProject.Data/Migrations/20210313163754_ChangeRefreshTokenSize.Designer.cs +++ b/Orion.Data/Migrations/20210313163754_ChangeRefreshTokenSize.Designer.cs @@ -1,13 +1,13 @@ -// +// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using VBaseProject.Data.Context; +using Orion.Data.Context; -namespace VBaseProject.Data.Migrations +namespace Orion.Data.Migrations { [DbContext(typeof(DataContext))] [Migration("20210313163754_ChangeRefreshTokenSize")] @@ -21,7 +21,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasAnnotation("ProductVersion", "5.0.3") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("VBaseProject.Entities.Domain.Customer", b => + modelBuilder.Entity("Orion.Entities.Domain.Customer", b => { b.Property("CustomerId") .ValueGeneratedOnAdd() @@ -52,7 +52,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("Customer"); }); - modelBuilder.Entity("VBaseProject.Entities.Domain.RefreshToken", b => + modelBuilder.Entity("Orion.Entities.Domain.RefreshToken", b => { b.Property("Refreshtoken") .HasMaxLength(300) @@ -82,7 +82,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("RefreshToken"); }); - modelBuilder.Entity("VBaseProject.Entities.Domain.User", b => + modelBuilder.Entity("Orion.Entities.Domain.User", b => { b.Property("UserId") .ValueGeneratedOnAdd() diff --git a/VBaseProject.Data/Migrations/20210313163754_ChangeRefreshTokenSize.cs b/Orion.Data/Migrations/20210313163754_ChangeRefreshTokenSize.cs similarity index 97% rename from VBaseProject.Data/Migrations/20210313163754_ChangeRefreshTokenSize.cs rename to Orion.Data/Migrations/20210313163754_ChangeRefreshTokenSize.cs index 7eedb5a..d134b45 100644 --- a/VBaseProject.Data/Migrations/20210313163754_ChangeRefreshTokenSize.cs +++ b/Orion.Data/Migrations/20210313163754_ChangeRefreshTokenSize.cs @@ -1,8 +1,8 @@ -using System; +using System; using System.Diagnostics.CodeAnalysis; using Microsoft.EntityFrameworkCore.Migrations; -namespace VBaseProject.Data.Migrations +namespace Orion.Data.Migrations { [ExcludeFromCodeCoverage] public partial class ChangeRefreshTokenSize : Migration diff --git a/VBaseProject.Data/Migrations/DataContextModelSnapshot.cs b/Orion.Data/Migrations/DataContextModelSnapshot.cs similarity index 93% rename from VBaseProject.Data/Migrations/DataContextModelSnapshot.cs rename to Orion.Data/Migrations/DataContextModelSnapshot.cs index 7af0674..84ee82d 100644 --- a/VBaseProject.Data/Migrations/DataContextModelSnapshot.cs +++ b/Orion.Data/Migrations/DataContextModelSnapshot.cs @@ -1,12 +1,12 @@ -// +// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using System; using System.Diagnostics.CodeAnalysis; -using VBaseProject.Data.Context; +using Orion.Data.Context; -namespace VBaseProject.Data.Migrations +namespace Orion.Data.Migrations { [ExcludeFromCodeCoverage] [DbContext(typeof(DataContext))] @@ -20,7 +20,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasAnnotation("ProductVersion", "5.0.3") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("VBaseProject.Entities.Domain.Customer", b => + modelBuilder.Entity("Orion.Entities.Domain.Customer", b => { b.Property("CustomerId") .ValueGeneratedOnAdd() @@ -51,7 +51,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("Customer"); }); - modelBuilder.Entity("VBaseProject.Entities.Domain.RefreshToken", b => + modelBuilder.Entity("Orion.Entities.Domain.RefreshToken", b => { b.Property("Refreshtoken") .HasMaxLength(300) @@ -81,7 +81,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("RefreshToken"); }); - modelBuilder.Entity("VBaseProject.Entities.Domain.User", b => + modelBuilder.Entity("Orion.Entities.Domain.User", b => { b.Property("UserId") .ValueGeneratedOnAdd() diff --git a/VBaseProject.Data/VBaseProject.Data.csproj b/Orion.Data/Orion.Data.csproj similarity index 79% rename from VBaseProject.Data/VBaseProject.Data.csproj rename to Orion.Data/Orion.Data.csproj index e70b995..005f6d8 100644 --- a/VBaseProject.Data/VBaseProject.Data.csproj +++ b/Orion.Data/Orion.Data.csproj @@ -1,4 +1,4 @@ - + net7.0 @@ -20,8 +20,8 @@ - - + + diff --git a/VBaseProject.Data/Repository/Generic/BaseEntityRepository.cs b/Orion.Data/Repository/Generic/BaseEntityRepository.cs similarity index 92% rename from VBaseProject.Data/Repository/Generic/BaseEntityRepository.cs rename to Orion.Data/Repository/Generic/BaseEntityRepository.cs index e55615b..519fa5b 100644 --- a/VBaseProject.Data/Repository/Generic/BaseEntityRepository.cs +++ b/Orion.Data/Repository/Generic/BaseEntityRepository.cs @@ -4,10 +4,10 @@ using System.Linq; using System.Linq.Expressions; using System.Threading.Tasks; -using VBaseProject.Data.Context; -using VBaseProject.Entities.Domain; +using Orion.Data.Context; +using Orion.Entities.Domain; -namespace VBaseProject.Data.Repository.Generic +namespace Orion.Data.Repository.Generic { public class BaseEntityRepository : IBaseEntityRepository where T : BaseEntity { diff --git a/VBaseProject.Data/Repository/Generic/IBaseEntityRepository.cs b/Orion.Data/Repository/Generic/IBaseEntityRepository.cs similarity index 89% rename from VBaseProject.Data/Repository/Generic/IBaseEntityRepository.cs rename to Orion.Data/Repository/Generic/IBaseEntityRepository.cs index 0230154..b583e8c 100644 --- a/VBaseProject.Data/Repository/Generic/IBaseEntityRepository.cs +++ b/Orion.Data/Repository/Generic/IBaseEntityRepository.cs @@ -3,7 +3,7 @@ using System.Linq.Expressions; using System.Threading.Tasks; -namespace VBaseProject.Data.Repository.Generic +namespace Orion.Data.Repository.Generic { public interface IBaseEntityRepository where T : class { diff --git a/VBaseProject.Data/Repository/Implementations/CustomerRepository.cs b/Orion.Data/Repository/Implementations/CustomerRepository.cs similarity index 75% rename from VBaseProject.Data/Repository/Implementations/CustomerRepository.cs rename to Orion.Data/Repository/Implementations/CustomerRepository.cs index 207f4c1..5bfa468 100644 --- a/VBaseProject.Data/Repository/Implementations/CustomerRepository.cs +++ b/Orion.Data/Repository/Implementations/CustomerRepository.cs @@ -1,14 +1,14 @@ using Microsoft.EntityFrameworkCore; using System.Linq; using System.Threading.Tasks; -using VBaseProject.Data.Context; -using VBaseProject.Data.Repository.Generic; -using VBaseProject.Domain.Repositories; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Filter; -using VBaseProject.Entities.ValueObjects.Pagination; - -namespace VBaseProject.Data.Repository.Implementations +using Orion.Data.Context; +using Orion.Data.Repository.Generic; +using Orion.Domain.Repositories; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; + +namespace Orion.Data.Repository.Implementations { internal class CustomerRepository : BaseEntityRepository, ICustomerRepository { diff --git a/VBaseProject.Data/Repository/Implementations/RefreshTokenRepository.cs b/Orion.Data/Repository/Implementations/RefreshTokenRepository.cs similarity index 50% rename from VBaseProject.Data/Repository/Implementations/RefreshTokenRepository.cs rename to Orion.Data/Repository/Implementations/RefreshTokenRepository.cs index 6d2398a..28f0d81 100644 --- a/VBaseProject.Data/Repository/Implementations/RefreshTokenRepository.cs +++ b/Orion.Data/Repository/Implementations/RefreshTokenRepository.cs @@ -1,9 +1,9 @@ -using VBaseProject.Data.Context; -using VBaseProject.Data.Repository.Generic; -using VBaseProject.Domain.Repositories; -using VBaseProject.Entities.Domain; +using Orion.Data.Context; +using Orion.Data.Repository.Generic; +using Orion.Domain.Repositories; +using Orion.Entities.Domain; -namespace VBaseProject.Data.Repository.Implementations +namespace Orion.Data.Repository.Implementations { internal class RefreshTokenRepository : BaseEntityRepository, IRefreshTokenRepository { diff --git a/VBaseProject.Data/Repository/Implementations/UserRepository.cs b/Orion.Data/Repository/Implementations/UserRepository.cs similarity index 83% rename from VBaseProject.Data/Repository/Implementations/UserRepository.cs rename to Orion.Data/Repository/Implementations/UserRepository.cs index 792e119..124e755 100644 --- a/VBaseProject.Data/Repository/Implementations/UserRepository.cs +++ b/Orion.Data/Repository/Implementations/UserRepository.cs @@ -1,14 +1,14 @@ using Microsoft.EntityFrameworkCore; using System.Linq; using System.Threading.Tasks; -using VBaseProject.Data.Context; -using VBaseProject.Data.Repository.Generic; -using VBaseProject.Domain.Repositories; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Filter; -using VBaseProject.Entities.ValueObjects.Pagination; - -namespace VBaseProject.Data.Repository.Implementations +using Orion.Data.Context; +using Orion.Data.Repository.Generic; +using Orion.Domain.Repositories; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; + +namespace Orion.Data.Repository.Implementations { internal class UserRepository : BaseEntityRepository, IUserRepository { diff --git a/VBaseProject.Data/UnitOfWork/UnitOfWorkEntity.cs b/Orion.Data/UnitOfWork/UnitOfWorkEntity.cs similarity index 90% rename from VBaseProject.Data/UnitOfWork/UnitOfWorkEntity.cs rename to Orion.Data/UnitOfWork/UnitOfWorkEntity.cs index 8ad5ad9..88664f2 100644 --- a/VBaseProject.Data/UnitOfWork/UnitOfWorkEntity.cs +++ b/Orion.Data/UnitOfWork/UnitOfWorkEntity.cs @@ -3,12 +3,12 @@ using System; using System.Linq; using System.Threading.Tasks; -using VBaseProject.Data.Context; -using VBaseProject.Data.Repository.Implementations; -using VBaseProject.Domain.Repositories; -using VBaseProject.Domain.Repositories.UnitOfWork; +using Orion.Data.Context; +using Orion.Data.Repository.Implementations; +using Orion.Domain.Repositories; +using Orion.Domain.Repositories.UnitOfWork; -namespace VBaseProject.Data.UnitOfWork +namespace Orion.Data.UnitOfWork { public class UnitOfWorkEntity : IUnitOfWorkEntity, IDisposable { diff --git a/VBaseProject.Domain/Authentication/AuthenticationConfiguration.cs b/Orion.Domain/Authentication/AuthenticationConfiguration.cs similarity index 83% rename from VBaseProject.Domain/Authentication/AuthenticationConfiguration.cs rename to Orion.Domain/Authentication/AuthenticationConfiguration.cs index 58a4b9e..bd4637b 100644 --- a/VBaseProject.Domain/Authentication/AuthenticationConfiguration.cs +++ b/Orion.Domain/Authentication/AuthenticationConfiguration.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Domain.Authentication +namespace Orion.Domain.Authentication { public static class AuthorizationConfiguration { diff --git a/VBaseProject.Domain/Base/IBaseService.cs b/Orion.Domain/Base/IBaseService.cs similarity index 88% rename from VBaseProject.Domain/Base/IBaseService.cs rename to Orion.Domain/Base/IBaseService.cs index 23c9e09..5b5deaa 100644 --- a/VBaseProject.Domain/Base/IBaseService.cs +++ b/Orion.Domain/Base/IBaseService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace VBaseProject.Domain.Base +namespace Orion.Domain.Base { public interface IBaseService where T : class { diff --git a/VBaseProject.Domain/Exceptions/BusinessException.cs b/Orion.Domain/Exceptions/BusinessException.cs similarity index 89% rename from VBaseProject.Domain/Exceptions/BusinessException.cs rename to Orion.Domain/Exceptions/BusinessException.cs index c0eefb0..f0b231d 100644 --- a/VBaseProject.Domain/Exceptions/BusinessException.cs +++ b/Orion.Domain/Exceptions/BusinessException.cs @@ -1,6 +1,6 @@ using System; -namespace VBaseProject.Domain.Exceptions +namespace Orion.Domain.Exceptions { [Serializable] public class BusinessException : Exception diff --git a/VBaseProject.Domain/Exceptions/ConflictException.cs b/Orion.Domain/Exceptions/ConflictException.cs similarity index 83% rename from VBaseProject.Domain/Exceptions/ConflictException.cs rename to Orion.Domain/Exceptions/ConflictException.cs index 859b1b3..79d70ae 100644 --- a/VBaseProject.Domain/Exceptions/ConflictException.cs +++ b/Orion.Domain/Exceptions/ConflictException.cs @@ -1,6 +1,6 @@ using System; -namespace VBaseProject.Domain.Exceptions +namespace Orion.Domain.Exceptions { [Serializable] public class ConflictException : BusinessException diff --git a/VBaseProject.Domain/Exceptions/ExceptionResponse.cs b/Orion.Domain/Exceptions/ExceptionResponse.cs similarity index 92% rename from VBaseProject.Domain/Exceptions/ExceptionResponse.cs rename to Orion.Domain/Exceptions/ExceptionResponse.cs index 5183062..5fc379a 100644 --- a/VBaseProject.Domain/Exceptions/ExceptionResponse.cs +++ b/Orion.Domain/Exceptions/ExceptionResponse.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Domain.Exceptions +namespace Orion.Domain.Exceptions { public class ExceptionResponse { diff --git a/VBaseProject.Domain/Exceptions/NotFoundException.cs b/Orion.Domain/Exceptions/NotFoundException.cs similarity index 89% rename from VBaseProject.Domain/Exceptions/NotFoundException.cs rename to Orion.Domain/Exceptions/NotFoundException.cs index 6ebece2..4f115d2 100644 --- a/VBaseProject.Domain/Exceptions/NotFoundException.cs +++ b/Orion.Domain/Exceptions/NotFoundException.cs @@ -1,6 +1,6 @@ using System; -namespace VBaseProject.Domain.Exceptions +namespace Orion.Domain.Exceptions { [Serializable] public class NotFoundException : BusinessException diff --git a/VBaseProject.Domain/Exceptions/UnauthorizedUserException.cs b/Orion.Domain/Exceptions/UnauthorizedUserException.cs similarity index 84% rename from VBaseProject.Domain/Exceptions/UnauthorizedUserException.cs rename to Orion.Domain/Exceptions/UnauthorizedUserException.cs index 262c6ee..96d83cb 100644 --- a/VBaseProject.Domain/Exceptions/UnauthorizedUserException.cs +++ b/Orion.Domain/Exceptions/UnauthorizedUserException.cs @@ -1,6 +1,6 @@ using System; -namespace VBaseProject.Domain.Exceptions +namespace Orion.Domain.Exceptions { [Serializable] public class UnauthorizedUserException : BusinessException diff --git a/VBaseProject.Domain/Extensions/StrignExtensions.cs b/Orion.Domain/Extensions/StrignExtensions.cs similarity index 93% rename from VBaseProject.Domain/Extensions/StrignExtensions.cs rename to Orion.Domain/Extensions/StrignExtensions.cs index 6efa477..20153fa 100644 --- a/VBaseProject.Domain/Extensions/StrignExtensions.cs +++ b/Orion.Domain/Extensions/StrignExtensions.cs @@ -1,7 +1,7 @@ using System.Security.Cryptography; using System.Text; -namespace VBaseProject.Domain.Extensions +namespace Orion.Domain.Extensions { public static class StrignExtensions { diff --git a/VBaseProject.Domain/Implementation/CustomerService.cs b/Orion.Domain/Implementation/CustomerService.cs similarity index 84% rename from VBaseProject.Domain/Implementation/CustomerService.cs rename to Orion.Domain/Implementation/CustomerService.cs index 564e3f2..a55dc82 100644 --- a/VBaseProject.Domain/Implementation/CustomerService.cs +++ b/Orion.Domain/Implementation/CustomerService.cs @@ -1,12 +1,12 @@ using System.Threading.Tasks; -using VBaseProject.Domain.Exceptions; -using VBaseProject.Domain.Interfaces; -using VBaseProject.Domain.Repositories.UnitOfWork; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Filter; -using VBaseProject.Entities.ValueObjects.Pagination; - -namespace VBaseProject.Domain.Implementation +using Orion.Domain.Exceptions; +using Orion.Domain.Interfaces; +using Orion.Domain.Repositories.UnitOfWork; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; + +namespace Orion.Domain.Implementation { public class CustomerService : ICustomerService { diff --git a/VBaseProject.Domain/Implementation/UserService.cs b/Orion.Domain/Implementation/UserService.cs similarity index 88% rename from VBaseProject.Domain/Implementation/UserService.cs rename to Orion.Domain/Implementation/UserService.cs index 5df0f6f..b3fa4ca 100644 --- a/VBaseProject.Domain/Implementation/UserService.cs +++ b/Orion.Domain/Implementation/UserService.cs @@ -1,24 +1,24 @@ using Microsoft.Extensions.Localization; using System.Linq; using System.Threading.Tasks; -using VBaseProject.Domain.Exceptions; -using VBaseProject.Domain.Extensions; -using VBaseProject.Domain.Interfaces; -using VBaseProject.Domain.Repositories.UnitOfWork; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Filter; -using VBaseProject.Entities.ValueObjects.Pagination; -using VBaseProject.Resources; -using static VBaseProject.Resources.Messages.MessagesKeys; - -namespace VBaseProject.Domain.Implementation +using Orion.Domain.Exceptions; +using Orion.Domain.Extensions; +using Orion.Domain.Interfaces; +using Orion.Domain.Repositories.UnitOfWork; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; +using Orion.Resources; +using static Orion.Resources.Messages.MessagesKeys; + +namespace Orion.Domain.Implementation { public class UserService : IUserService { private readonly IUnitOfWorkEntity _unitOfWork; - private readonly IStringLocalizer _messages; + private readonly IStringLocalizer _messages; - public UserService(IUnitOfWorkEntity unitOfWork, IStringLocalizer resourceMessages) + public UserService(IUnitOfWorkEntity unitOfWork, IStringLocalizer resourceMessages) { _unitOfWork = unitOfWork; _messages = resourceMessages; diff --git a/Orion.Domain/Interfaces/ICustomerService.cs b/Orion.Domain/Interfaces/ICustomerService.cs new file mode 100644 index 0000000..363b00a --- /dev/null +++ b/Orion.Domain/Interfaces/ICustomerService.cs @@ -0,0 +1,13 @@ +using System.Threading.Tasks; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; +using Orion.Domain.Base; + +namespace Orion.Domain.Interfaces +{ + public interface ICustomerService : IBaseService + { + Task> ListPaginate(CustomerFilter filter); + } +} diff --git a/VBaseProject.Domain/Interfaces/IUserService.cs b/Orion.Domain/Interfaces/IUserService.cs similarity index 64% rename from VBaseProject.Domain/Interfaces/IUserService.cs rename to Orion.Domain/Interfaces/IUserService.cs index 54e0768..8fd342f 100644 --- a/VBaseProject.Domain/Interfaces/IUserService.cs +++ b/Orion.Domain/Interfaces/IUserService.cs @@ -1,10 +1,10 @@ using System.Threading.Tasks; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Filter; -using VBaseProject.Entities.ValueObjects.Pagination; -using VBaseProject.Domain.Base; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; +using Orion.Domain.Base; -namespace VBaseProject.Domain.Interfaces +namespace Orion.Domain.Interfaces { public interface IUserService : IBaseService { diff --git a/Orion.Domain/Orion.Domain.csproj b/Orion.Domain/Orion.Domain.csproj new file mode 100644 index 0000000..c7133d2 --- /dev/null +++ b/Orion.Domain/Orion.Domain.csproj @@ -0,0 +1,12 @@ + + + + net7.0 + + + + + + + + diff --git a/VBaseProject.Domain/Repositories/Base/IBaseEntityRepository.cs b/Orion.Domain/Repositories/Base/IBaseEntityRepository.cs similarity index 89% rename from VBaseProject.Domain/Repositories/Base/IBaseEntityRepository.cs rename to Orion.Domain/Repositories/Base/IBaseEntityRepository.cs index eb8645d..5947781 100644 --- a/VBaseProject.Domain/Repositories/Base/IBaseEntityRepository.cs +++ b/Orion.Domain/Repositories/Base/IBaseEntityRepository.cs @@ -3,7 +3,7 @@ using System.Linq.Expressions; using System.Threading.Tasks; -namespace VBaseProject.Domain.Repositories.Base +namespace Orion.Domain.Repositories.Base { public interface IBaseEntityRepository where T : class { diff --git a/Orion.Domain/Repositories/ICustomerRepository.cs b/Orion.Domain/Repositories/ICustomerRepository.cs new file mode 100644 index 0000000..b9d0b0e --- /dev/null +++ b/Orion.Domain/Repositories/ICustomerRepository.cs @@ -0,0 +1,13 @@ +using System.Threading.Tasks; +using Orion.Domain.Repositories.Base; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; + +namespace Orion.Domain.Repositories +{ + public interface ICustomerRepository : IBaseEntityRepository + { + Task> ListPaginate(CustomerFilter filter); + } +} diff --git a/Orion.Domain/Repositories/IRefreshTokenRepository.cs b/Orion.Domain/Repositories/IRefreshTokenRepository.cs new file mode 100644 index 0000000..4829e2d --- /dev/null +++ b/Orion.Domain/Repositories/IRefreshTokenRepository.cs @@ -0,0 +1,10 @@ +using Orion.Domain.Repositories.Base; +using Orion.Entities.Domain; + +namespace Orion.Domain.Repositories +{ + public interface IRefreshTokenRepository : IBaseEntityRepository + { + + } +} diff --git a/VBaseProject.Domain/Repositories/IUserRepository.cs b/Orion.Domain/Repositories/IUserRepository.cs similarity index 57% rename from VBaseProject.Domain/Repositories/IUserRepository.cs rename to Orion.Domain/Repositories/IUserRepository.cs index 9b0229b..82657b4 100644 --- a/VBaseProject.Domain/Repositories/IUserRepository.cs +++ b/Orion.Domain/Repositories/IUserRepository.cs @@ -1,10 +1,10 @@ using System.Threading.Tasks; -using VBaseProject.Domain.Repositories.Base; -using VBaseProject.Entities.Domain; -using VBaseProject.Entities.Filter; -using VBaseProject.Entities.ValueObjects.Pagination; +using Orion.Domain.Repositories.Base; +using Orion.Entities.Domain; +using Orion.Entities.Filter; +using Orion.Entities.ValueObjects.Pagination; -namespace VBaseProject.Domain.Repositories +namespace Orion.Domain.Repositories { public interface IUserRepository : IBaseEntityRepository { diff --git a/VBaseProject.Domain/Repositories/UnitOfWork/IUnitOfWorkEntity.cs b/Orion.Domain/Repositories/UnitOfWork/IUnitOfWorkEntity.cs similarity index 85% rename from VBaseProject.Domain/Repositories/UnitOfWork/IUnitOfWorkEntity.cs rename to Orion.Domain/Repositories/UnitOfWork/IUnitOfWorkEntity.cs index ae15bc9..bbf2c9e 100644 --- a/VBaseProject.Domain/Repositories/UnitOfWork/IUnitOfWorkEntity.cs +++ b/Orion.Domain/Repositories/UnitOfWork/IUnitOfWorkEntity.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace VBaseProject.Domain.Repositories.UnitOfWork +namespace Orion.Domain.Repositories.UnitOfWork { public interface IUnitOfWorkEntity { diff --git a/VBaseProject.Entities/Domain/BaseEntity.cs b/Orion.Entities/Domain/BaseEntity.cs similarity index 84% rename from VBaseProject.Entities/Domain/BaseEntity.cs rename to Orion.Entities/Domain/BaseEntity.cs index c407519..d77dacf 100644 --- a/VBaseProject.Entities/Domain/BaseEntity.cs +++ b/Orion.Entities/Domain/BaseEntity.cs @@ -1,6 +1,6 @@ using System; -namespace VBaseProject.Entities.Domain +namespace Orion.Entities.Domain { public abstract class BaseEntity { diff --git a/VBaseProject.Entities/Domain/Customer.cs b/Orion.Entities/Domain/Customer.cs similarity index 78% rename from VBaseProject.Entities/Domain/Customer.cs rename to Orion.Entities/Domain/Customer.cs index 86921c0..10cdd5d 100644 --- a/VBaseProject.Entities/Domain/Customer.cs +++ b/Orion.Entities/Domain/Customer.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Entities.Domain +namespace Orion.Entities.Domain { public class Customer : BaseEntity { diff --git a/VBaseProject.Entities/Domain/RefreshToken.cs b/Orion.Entities/Domain/RefreshToken.cs similarity index 79% rename from VBaseProject.Entities/Domain/RefreshToken.cs rename to Orion.Entities/Domain/RefreshToken.cs index 9714ec0..23f8a74 100644 --- a/VBaseProject.Entities/Domain/RefreshToken.cs +++ b/Orion.Entities/Domain/RefreshToken.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Entities.Domain +namespace Orion.Entities.Domain { public class RefreshToken : BaseEntity { diff --git a/VBaseProject.Entities/Domain/User.cs b/Orion.Entities/Domain/User.cs similarity index 78% rename from VBaseProject.Entities/Domain/User.cs rename to Orion.Entities/Domain/User.cs index 84c6f44..6a1bc72 100644 --- a/VBaseProject.Entities/Domain/User.cs +++ b/Orion.Entities/Domain/User.cs @@ -1,6 +1,6 @@ -using VBaseProject.Entities.Enuns; +using Orion.Entities.Enuns; -namespace VBaseProject.Entities.Domain +namespace Orion.Entities.Domain { public class User : BaseEntity { diff --git a/VBaseProject.Entities/Enuns/UserProfile.cs b/Orion.Entities/Enuns/UserProfile.cs similarity index 68% rename from VBaseProject.Entities/Enuns/UserProfile.cs rename to Orion.Entities/Enuns/UserProfile.cs index a071bbd..b4b47c4 100644 --- a/VBaseProject.Entities/Enuns/UserProfile.cs +++ b/Orion.Entities/Enuns/UserProfile.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Entities.Enuns +namespace Orion.Entities.Enuns { public enum UserProfile { diff --git a/VBaseProject.Entities/Filter/BaseFilter.cs b/Orion.Entities/Filter/BaseFilter.cs similarity index 84% rename from VBaseProject.Entities/Filter/BaseFilter.cs rename to Orion.Entities/Filter/BaseFilter.cs index 3f5cae3..7ed6633 100644 --- a/VBaseProject.Entities/Filter/BaseFilter.cs +++ b/Orion.Entities/Filter/BaseFilter.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Entities.Filter +namespace Orion.Entities.Filter { public abstract class BaseFilter { diff --git a/Orion.Entities/Filter/CustomerFilter.cs b/Orion.Entities/Filter/CustomerFilter.cs new file mode 100644 index 0000000..f07d3ed --- /dev/null +++ b/Orion.Entities/Filter/CustomerFilter.cs @@ -0,0 +1,9 @@ +using Orion.Entities.Domain; + +namespace Orion.Entities.Filter +{ + public class CustomerFilter : BaseFilter + { + + } +} diff --git a/Orion.Entities/Filter/UserFilter.cs b/Orion.Entities/Filter/UserFilter.cs new file mode 100644 index 0000000..39c8adb --- /dev/null +++ b/Orion.Entities/Filter/UserFilter.cs @@ -0,0 +1,9 @@ +using Orion.Entities.Domain; + +namespace Orion.Entities.Filter +{ + public class UserFilter : BaseFilter + { + + } +} diff --git a/VBaseProject.Entities/VBaseProject.Entities.csproj b/Orion.Entities/Orion.Entities.csproj similarity index 100% rename from VBaseProject.Entities/VBaseProject.Entities.csproj rename to Orion.Entities/Orion.Entities.csproj diff --git a/VBaseProject.Entities/ValueObjects/Pagination/PagedList.cs b/Orion.Entities/ValueObjects/Pagination/PagedList.cs similarity index 73% rename from VBaseProject.Entities/ValueObjects/Pagination/PagedList.cs rename to Orion.Entities/ValueObjects/Pagination/PagedList.cs index bff4c7d..45bf8db 100644 --- a/VBaseProject.Entities/ValueObjects/Pagination/PagedList.cs +++ b/Orion.Entities/ValueObjects/Pagination/PagedList.cs @@ -1,6 +1,6 @@ -using System.Collections.Generic; +using System.Collections.Generic; -namespace VBaseProject.Entities.ValueObjects.Pagination +namespace Orion.Entities.ValueObjects.Pagination { public class PagedList { diff --git a/VBaseProject.Ioc/Dependencies/DependenciesInjectionConfiguration.cs b/Orion.Ioc/Dependencies/DependenciesInjectionConfiguration.cs similarity index 71% rename from VBaseProject.Ioc/Dependencies/DependenciesInjectionConfiguration.cs rename to Orion.Ioc/Dependencies/DependenciesInjectionConfiguration.cs index e7c6c8b..86a835d 100644 --- a/VBaseProject.Ioc/Dependencies/DependenciesInjectionConfiguration.cs +++ b/Orion.Ioc/Dependencies/DependenciesInjectionConfiguration.cs @@ -1,10 +1,10 @@ -using Microsoft.Extensions.DependencyInjection; -using VBaseProject.Data.UnitOfWork; -using VBaseProject.Domain.Implementation; -using VBaseProject.Domain.Interfaces; -using VBaseProject.Domain.Repositories.UnitOfWork; +using Microsoft.Extensions.DependencyInjection; +using Orion.Data.UnitOfWork; +using Orion.Domain.Implementation; +using Orion.Domain.Interfaces; +using Orion.Domain.Repositories.UnitOfWork; -namespace VBaseProject.Ioc.Dependencies +namespace Orion.Ioc.Dependencies { public static class DependenciesInjectionConfiguration { diff --git a/Orion.Ioc/Orion.Ioc.csproj b/Orion.Ioc/Orion.Ioc.csproj new file mode 100644 index 0000000..41bc20d --- /dev/null +++ b/Orion.Ioc/Orion.Ioc.csproj @@ -0,0 +1,14 @@ + + + + net7.0 + enable + enable + + + + + + + + diff --git a/VBaseProject.Resources/ISharedResource.cs b/Orion.Resources/ISharedResource.cs similarity index 59% rename from VBaseProject.Resources/ISharedResource.cs rename to Orion.Resources/ISharedResource.cs index 7285b2c..aba2a15 100644 --- a/VBaseProject.Resources/ISharedResource.cs +++ b/Orion.Resources/ISharedResource.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Resources +namespace Orion.Resources { public interface ISharedResource { diff --git a/VBaseProject.Resources/Messages/MessagesKeys.cs b/Orion.Resources/Messages/MessagesKeys.cs similarity index 95% rename from VBaseProject.Resources/Messages/MessagesKeys.cs rename to Orion.Resources/Messages/MessagesKeys.cs index 3bf3393..7fd322a 100644 --- a/VBaseProject.Resources/Messages/MessagesKeys.cs +++ b/Orion.Resources/Messages/MessagesKeys.cs @@ -1,4 +1,4 @@ -namespace VBaseProject.Resources.Messages +namespace Orion.Resources.Messages { /// /// Update All Resoure Files to matain the globalization support diff --git a/VBaseProject.Resources/VBaseProject.Resources.csproj b/Orion.Resources/Orion.Resources.csproj similarity index 79% rename from VBaseProject.Resources/VBaseProject.Resources.csproj rename to Orion.Resources/Orion.Resources.csproj index 0910863..e578fc4 100644 --- a/VBaseProject.Resources/VBaseProject.Resources.csproj +++ b/Orion.Resources/Orion.Resources.csproj @@ -1,4 +1,4 @@ - + net7.0 @@ -15,11 +15,11 @@ - + PublicResXFileCodeGenerator Always - + PublicResXFileCodeGenerator Always diff --git a/VBaseProject.Resources/VBaseProjectResources.cs b/Orion.Resources/OrionResources.cs similarity index 55% rename from VBaseProject.Resources/VBaseProjectResources.cs rename to Orion.Resources/OrionResources.cs index fb0130d..dcf95bd 100644 --- a/VBaseProject.Resources/VBaseProjectResources.cs +++ b/Orion.Resources/OrionResources.cs @@ -1,12 +1,12 @@ -using Microsoft.Extensions.Localization; +using Microsoft.Extensions.Localization; -namespace VBaseProject.Resources +namespace Orion.Resources { - public class VBaseProjectResources : ISharedResource + public class OrionResources : ISharedResource { private readonly IStringLocalizer _localizer; - public VBaseProjectResources(IStringLocalizer localizer) + public OrionResources(IStringLocalizer localizer) { _localizer = localizer; } diff --git a/VBaseProject.Resources/Resources/VBaseProjectResources.en-US.resx b/Orion.Resources/Resources/OrionResources.en-US.resx similarity index 99% rename from VBaseProject.Resources/Resources/VBaseProjectResources.en-US.resx rename to Orion.Resources/Resources/OrionResources.en-US.resx index 9cec7d7..b106b95 100644 --- a/VBaseProject.Resources/Resources/VBaseProjectResources.en-US.resx +++ b/Orion.Resources/Resources/OrionResources.en-US.resx @@ -1,4 +1,4 @@ - +