Skip to content

Commit

Permalink
Remove Entities project to keep clean the project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderlan committed Oct 13, 2023
1 parent 1699e0f commit 18430be
Show file tree
Hide file tree
Showing 47 changed files with 83 additions and 99 deletions.
7 changes: 0 additions & 7 deletions Orion.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4 - TEST", "4 - TEST", "{B3
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Orion.Test", "tests\Orion.Test\Orion.Test.csproj", "{AA8C7554-18FC-40D7-A318-123D2AAAB023}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Orion.Entities", "src\Orion.Entities\Orion.Entities.csproj", "{9500DFAF-83A8-4FFE-9564-DEC6601CD91E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Orion.Data", "src\Orion.Data\Orion.Data.csproj", "{7C877ABA-17F2-470A-99EB-5E172C6EA44B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Orion.Resources", "src\Orion.Resources\Orion.Resources.csproj", "{105D1EB4-5091-493E-B75E-2131169CC9AC}"
Expand Down Expand Up @@ -52,10 +50,6 @@ Global
{AA8C7554-18FC-40D7-A318-123D2AAAB023}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA8C7554-18FC-40D7-A318-123D2AAAB023}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA8C7554-18FC-40D7-A318-123D2AAAB023}.Release|Any CPU.Build.0 = Release|Any CPU
{9500DFAF-83A8-4FFE-9564-DEC6601CD91E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9500DFAF-83A8-4FFE-9564-DEC6601CD91E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9500DFAF-83A8-4FFE-9564-DEC6601CD91E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9500DFAF-83A8-4FFE-9564-DEC6601CD91E}.Release|Any CPU.Build.0 = Release|Any CPU
{7C877ABA-17F2-470A-99EB-5E172C6EA44B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C877ABA-17F2-470A-99EB-5E172C6EA44B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C877ABA-17F2-470A-99EB-5E172C6EA44B}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -79,7 +73,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{8C8470D6-0951-4B42-8935-779D8672F5B1} = {11C424D2-7519-493F-B4BB-A5901B33C56B}
{AA8C7554-18FC-40D7-A318-123D2AAAB023} = {B333633B-8361-476B-A0A3-6B983D28904E}
{9500DFAF-83A8-4FFE-9564-DEC6601CD91E} = {67A0BEBC-35B1-436C-9F05-AC8F60AF1688}
{7C877ABA-17F2-470A-99EB-5E172C6EA44B} = {434E301F-C36C-4203-B334-D3948130B660}
{105D1EB4-5091-493E-B75E-2131169CC9AC} = {434E301F-C36C-4203-B334-D3948130B660}
{8C70C31A-892F-4C8F-B7B0-A710C97A55FA} = {2D8CC498-597C-4415-95BF-48E623039F90}
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# **Orion Api**

[![Build](https://github.com/vanderlan/Orion-Api/actions/workflows/sonar.yml/badge.svg)](https://github.com/vanderlan/Orion-Api/actions/workflows/sonar.yml)
[![Coverage Status](https://coveralls.io/repos/github/vanderlan/Orion-Api/badge.svg)](https://coveralls.io/github/vanderlan/Orion-Api) <a href="https://codeclimate.com/github/vanderlan/Orion-Api/maintainability"><img src="https://api.codeclimate.com/v1/badges/692bddf02255681fe599/maintainability" /></a>
[![Coverage Status](https://coveralls.io/repos/github/vanderlan/Orion-Api/badge.svg)](https://coveralls.io/github/vanderlan/Orion-Api) <a href="https://codeclimate.com/github/vanderlan/Orion-Api/maintainability"><img src="https://api.codeclimate.com/v1/badges/76a30970ddd45c75129b/maintainability" /></a>
[![GitHub release](https://img.shields.io/github/release/vanderlan/Orion-Api.svg)](https://GitHub.com/vanderlan/Orion-Api/)
[![GitHub repo size](https://img.shields.io/github/repo-size/vanderlan/Orion-Api)](https://github.com/vanderlan/Orion-Api)

Expand Down Expand Up @@ -59,4 +59,7 @@ The main objective is to start projects with a clean and simple architecture, wi

**Run database migrations**

dotnet ef database update -p Orion.Data -s Orion.Api --verbose
dotnet ef database update -p Orion.Data -s Orion.Api --verbose


Author: https://github.com/vanderlan
4 changes: 2 additions & 2 deletions src/Orion.Api/AutoMapper/Config/DomainToOutputProfile.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using AutoMapper;
using Orion.Api.AutoMapper.Output;
using Orion.Entities.Domain;
using Orion.Entities.ValueObjects.Pagination;
using Orion.Domain.Entities;
using Orion.Domain.Entities.ValueObjects.Pagination;

namespace Orion.Api.AutoMapper.Config
{
Expand Down
2 changes: 1 addition & 1 deletion src/Orion.Api/AutoMapper/Config/InputToDomainProfile.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AutoMapper;
using Orion.Api.AutoMapper.Input;
using Orion.Entities.Domain;
using Orion.Domain.Entities;

namespace Orion.Api.AutoMapper.Config
{
Expand Down
2 changes: 1 addition & 1 deletion src/Orion.Api/AutoMapper/Input/UserInput.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Orion.Entities.Enuns;
using Orion.Domain.Entities.Enuns;

namespace Orion.Api.AutoMapper.Input
{
Expand Down
2 changes: 1 addition & 1 deletion src/Orion.Api/AutoMapper/Output/UserOutput.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

using Orion.Entities.Enuns;
using Orion.Domain.Entities.Enuns;
using Orion.Domain.Authentication;

namespace Orion.Api.AutoMapper.Output
Expand Down
2 changes: 1 addition & 1 deletion src/Orion.Api/Controllers/AuthController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Orion.Api.Models;
using Orion.Domain.Extensions;
using Orion.Domain.Services.Interfaces;
using Orion.Entities.Domain;
using Orion.Domain.Entities;
using System.IdentityModel.Tokens.Jwt;

namespace Orion.Api.Controllers
Expand Down
6 changes: 3 additions & 3 deletions src/Orion.Api/Controllers/CustomersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
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.Services.Interfaces;
using static Orion.Domain.Authentication.AuthorizationConfiguration;
using Orion.Domain.Entities;
using Orion.Domain.Entities.Filter;
using Orion.Domain.Entities.ValueObjects.Pagination;

namespace Orion.Api.Controllers
{
Expand Down
6 changes: 3 additions & 3 deletions src/Orion.Api/Controllers/UsersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
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.Entities.Filter;
using Orion.Domain.Entities.ValueObjects.Pagination;
using Orion.Domain.Services.Interfaces;
using static Orion.Domain.Authentication.AuthorizationConfiguration;
using Orion.Domain.Entities;

namespace Orion.Api.Controllers
{
Expand Down
1 change: 0 additions & 1 deletion src/Orion.Api/Orion.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

<ItemGroup>
<ProjectReference Include="..\Orion.Domain\Orion.Domain.csproj" />
<ProjectReference Include="..\Orion.Entities\Orion.Entities.csproj" />
<ProjectReference Include="..\Orion.Ioc\Orion.Ioc.csproj" />
<ProjectReference Include="..\Orion.Resources\Orion.Resources.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Orion.Data/Context/DataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Linq;
using System.Threading.Tasks;
using Orion.Data.Mapping;
using Orion.Entities.Domain;
using Microsoft.Extensions.Configuration;
using Orion.Domain.Entities;

namespace Orion.Data.Context
{
Expand Down
2 changes: 1 addition & 1 deletion src/Orion.Data/Mapping/CustomerMapping.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Orion.Entities.Domain;
using Orion.Domain.Entities;

namespace Orion.Data.Mapping
{
Expand Down
2 changes: 1 addition & 1 deletion src/Orion.Data/Mapping/RefreshTokenMapping.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Orion.Entities.Domain;
using Orion.Domain.Entities;

namespace Orion.Data.Mapping
{
Expand Down
4 changes: 2 additions & 2 deletions src/Orion.Data/Mapping/UserMapping.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using Orion.Entities.Domain;
using Orion.Entities.Enuns;
using Orion.Domain.Entities.Enuns;
using Orion.Domain.Entities;

namespace Orion.Data.Mapping
{
Expand Down
6 changes: 3 additions & 3 deletions src/Orion.Data/Migrations/20210311124539_Initial.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/Orion.Data/Migrations/DataContextModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasAnnotation("ProductVersion", "5.0.3")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

modelBuilder.Entity("Orion.Entities.Domain.Customer", b =>
modelBuilder.Entity("Orion.Domain.Entities.Customer", b =>
{
b.Property<int>("CustomerId")
.ValueGeneratedOnAdd()
Expand Down Expand Up @@ -51,7 +51,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("Customer");
});

modelBuilder.Entity("Orion.Entities.Domain.RefreshToken", b =>
modelBuilder.Entity("Orion.Domain.Entities.RefreshToken", b =>
{
b.Property<string>("Refreshtoken")
.HasMaxLength(300)
Expand Down Expand Up @@ -81,7 +81,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("RefreshToken");
});

modelBuilder.Entity("Orion.Entities.Domain.User", b =>
modelBuilder.Entity("Orion.Domain.Entities.User", b =>
{
b.Property<int>("UserId")
.ValueGeneratedOnAdd()
Expand Down
1 change: 0 additions & 1 deletion src/Orion.Data/Orion.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

<ItemGroup>
<ProjectReference Include="..\Orion.Domain\Orion.Domain.csproj" />
<ProjectReference Include="..\Orion.Entities\Orion.Entities.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Orion.Data/Repository/Generic/BaseEntityRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
using System.Linq.Expressions;
using System.Threading.Tasks;
using Orion.Data.Context;
using Orion.Entities.Domain;
using Orion.Entities.Filter;
using Orion.Entities.ValueObjects.Pagination;
using Orion.Domain.Entities.Filter;
using Orion.Domain.Entities.ValueObjects.Pagination;
using Orion.Domain.Entities;

namespace Orion.Data.Repository.Generic
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Orion.Data.Context;
using Orion.Data.Repository.Generic;
using Orion.Domain.Entities;
using Orion.Domain.Repositories;
using Orion.Entities.Domain;
using Orion.Entities.Filter;
using Orion.Domain.Entities.Filter;
using System.Linq;

namespace Orion.Data.Repository.Implementations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Orion.Data.Context;
using Orion.Data.Repository.Generic;
using Orion.Domain.Entities;
using Orion.Domain.Repositories;
using Orion.Entities.Domain;

namespace Orion.Data.Repository.Implementations
{
Expand Down
4 changes: 2 additions & 2 deletions src/Orion.Data/Repository/Implementations/UserRepository.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Orion.Data.Context;
using Orion.Data.Repository.Generic;
using Orion.Domain.Entities;
using Orion.Domain.Repositories;
using Orion.Entities.Domain;
using Orion.Entities.Filter;
using Orion.Domain.Entities.Filter;
using System.Linq;
using System.Threading.Tasks;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Orion.Entities.Domain
namespace Orion.Domain.Entities
{
public abstract class BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Orion.Entities.Domain
namespace Orion.Domain.Entities
{
public class Customer : BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel;

namespace Orion.Entities.Enuns
namespace Orion.Domain.Entities.Enuns
{
public enum UserProfile
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Orion.Entities.Filter
namespace Orion.Domain.Entities.Filter
{
public class BaseFilter<T>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Orion.Entities.Domain
namespace Orion.Domain.Entities
{
public class RefreshToken : BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Orion.Entities.Enuns;
using Orion.Domain.Entities.Enuns;

namespace Orion.Entities.Domain
namespace Orion.Domain.Entities
{
public class User : BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

namespace Orion.Entities.ValueObjects.Pagination
namespace Orion.Domain.Entities.ValueObjects.Pagination
{
public class PagedList<T>
{
Expand Down
1 change: 0 additions & 1 deletion src/Orion.Domain/Orion.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Orion.Entities\Orion.Entities.csproj" />
<ProjectReference Include="..\Orion.Resources\Orion.Resources.csproj" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/Orion.Domain/Repositories/ICustomerRepository.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Threading.Tasks;
using Orion.Domain.Entities;
using Orion.Domain.Entities.Filter;
using Orion.Domain.Entities.ValueObjects.Pagination;
using Orion.Domain.Repositories.Base;
using Orion.Entities.Domain;
using Orion.Entities.Filter;
using Orion.Entities.ValueObjects.Pagination;
using System.Threading.Tasks;

namespace Orion.Domain.Repositories
{
Expand Down
2 changes: 1 addition & 1 deletion src/Orion.Domain/Repositories/IRefreshTokenRepository.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Orion.Domain.Entities;
using Orion.Domain.Repositories.Base;
using Orion.Entities.Domain;

namespace Orion.Domain.Repositories
{
Expand Down
8 changes: 4 additions & 4 deletions src/Orion.Domain/Repositories/IUserRepository.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Threading.Tasks;
using Orion.Domain.Entities;
using Orion.Domain.Entities.Filter;
using Orion.Domain.Entities.ValueObjects.Pagination;
using Orion.Domain.Repositories.Base;
using Orion.Entities.Domain;
using Orion.Entities.Filter;
using Orion.Entities.ValueObjects.Pagination;
using System.Threading.Tasks;

namespace Orion.Domain.Repositories
{
Expand Down
Loading

0 comments on commit 18430be

Please sign in to comment.