Skip to content

Commit

Permalink
reorganise files make classes internal if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsonax committed May 20, 2024
1 parent 3e03a29 commit ca5e102
Show file tree
Hide file tree
Showing 29 changed files with 47 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Bogus;
using CleanAspCore.Features.Departments.Endpoints;
using CleanAspCore.Endpoints.Departments;

namespace CleanAspCore.Api.Tests.Fakers;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Bogus;
using CleanAspCore.Features.Employees.Endpoints;
using CleanAspCore.Endpoints.Employees;

namespace CleanAspCore.Api.Tests.Fakers;

Expand Down
2 changes: 1 addition & 1 deletion CleanAspCore.Api.Tests/Fakers/CreateJobRequestFaker.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Bogus;
using CleanAspCore.Features.Jobs.Endpoints;
using CleanAspCore.Endpoints.Jobs;

namespace CleanAspCore.Api.Tests.Fakers;

Expand Down
2 changes: 1 addition & 1 deletion CleanAspCore.Api.Tests/Fakers/DepartmentFaker.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Bogus;
using CleanAspCore.Data.Features.Departments;
using CleanAspCore.Data.Models.Departments;

namespace CleanAspCore.Api.Tests.Fakers;

Expand Down
2 changes: 1 addition & 1 deletion CleanAspCore.Api.Tests/Fakers/EmployeeFaker.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Bogus;
using CleanAspCore.Data.Features.Employees;
using CleanAspCore.Data.Models.Employees;
using CleanAspCore.Domain;

namespace CleanAspCore.Api.Tests.Fakers;
Expand Down
2 changes: 1 addition & 1 deletion CleanAspCore.Api.Tests/Fakers/JobFaker.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Bogus;
using CleanAspCore.Data.Features.Jobs;
using CleanAspCore.Data.Models.Jobs;

namespace CleanAspCore.Api.Tests.Fakers;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CleanAspCore.Features.Departments.Endpoints;
using CleanAspCore.Endpoints.Departments;
using Refit;

namespace CleanAspCore.Api.Tests.Features.Departments;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using CleanAspCore.Api.Tests.Fakers;
using CleanAspCore.Features.Employees.Endpoints;
using CleanAspCore.Endpoints.Employees;

namespace CleanAspCore.Api.Tests.Features.Employees;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CleanAspCore.Features.Employees.Endpoints;
using CleanAspCore.Endpoints.Employees;
using Refit;

namespace CleanAspCore.Api.Tests.Features.Employees;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using CleanAspCore.Api.Tests.Fakers;
using CleanAspCore.Features.Employees.Endpoints;
using CleanAspCore.Endpoints.Employees;

namespace CleanAspCore.Api.Tests.Features.Employees;

Expand Down
2 changes: 1 addition & 1 deletion CleanAspCore.Api.Tests/Features/Jobs/IJobApiClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CleanAspCore.Features.Jobs.Endpoints;
using CleanAspCore.Endpoints.Jobs;
using Refit;

namespace CleanAspCore.Api.Tests.Features.Jobs;
Expand Down
2 changes: 1 addition & 1 deletion CleanAspCore/CleanAspCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<Folder Include="Data\Features\" />
<Folder Include="Data\Models\" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions CleanAspCore/Data/HrContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using CleanAspCore.Data.Features.Departments;
using CleanAspCore.Data.Features.Employees;
using CleanAspCore.Data.Features.Jobs;
using CleanAspCore.Data.Models.Departments;
using CleanAspCore.Data.Models.Employees;
using CleanAspCore.Data.Models.Jobs;
using Microsoft.EntityFrameworkCore;

namespace CleanAspCore.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CleanAspCore.Data.Features.Departments;
namespace CleanAspCore.Data.Models.Departments;

public class Department : IEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using CleanAspCore.Data.Features.Departments;
using CleanAspCore.Data.Features.Jobs;
using CleanAspCore.Data.Models.Departments;
using CleanAspCore.Data.Models.Jobs;

namespace CleanAspCore.Data.Features.Employees;
namespace CleanAspCore.Data.Models.Employees;

public class Employee : IEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace CleanAspCore.Data.Features.Employees;
namespace CleanAspCore.Data.Models.Employees;

public class EmployeeConfiguration : IEntityTypeConfiguration<Employee>
internal sealed class EmployeeConfiguration : IEntityTypeConfiguration<Employee>
{
public void Configure(EntityTypeBuilder<Employee> builder)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CleanAspCore.Data.Features.Jobs;
namespace CleanAspCore.Data.Models.Jobs;

public class Job : IEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using CleanAspCore.Data;
using CleanAspCore.Data.Features.Departments;
using CleanAspCore.Data.Models.Departments;
using CleanAspCore.Extensions.FluentValidation;
using Microsoft.AspNetCore.Http.HttpResults;

namespace CleanAspCore.Features.Departments.Endpoints;
namespace CleanAspCore.Endpoints.Departments;

/// <summary>
/// A request to create a new department.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using CleanAspCore.Data;
using CleanAspCore.Data.Features.Departments;
using CleanAspCore.Data.Models.Departments;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.EntityFrameworkCore;

namespace CleanAspCore.Features.Departments.Endpoints;
namespace CleanAspCore.Endpoints.Departments;

/// <summary>
/// The get department response.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using CleanAspCore.Features.Departments.Endpoints;
using CleanAspCore.Utils;
using CleanAspCore.Utils;

namespace CleanAspCore.Features.Departments;
namespace CleanAspCore.Endpoints.Departments;

internal static class Routes
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using CleanAspCore.Data;
using CleanAspCore.Data.Features.Employees;
using CleanAspCore.Data.Models.Employees;
using CleanAspCore.Extensions.FluentValidation;
using Microsoft.AspNetCore.Http.HttpResults;

namespace CleanAspCore.Features.Employees.Endpoints;
namespace CleanAspCore.Endpoints.Employees;

/// <summary>
/// A request to create a new employee.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.EntityFrameworkCore;

namespace CleanAspCore.Features.Employees.Endpoints;
namespace CleanAspCore.Endpoints.Employees;

internal static class DeleteEmployeeById
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using CleanAspCore.Data;
using CleanAspCore.Data.Features.Employees;
using CleanAspCore.Data.Models.Employees;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.EntityFrameworkCore;

namespace CleanAspCore.Features.Employees.Endpoints;
namespace CleanAspCore.Endpoints.Employees;

/// <summary>
/// The get employee response.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using CleanAspCore.Features.Employees.Endpoints;
using CleanAspCore.Utils;
using CleanAspCore.Utils;

namespace CleanAspCore.Features.Employees;
namespace CleanAspCore.Endpoints.Employees;

internal static class Routes
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using CleanAspCore.Data;
using CleanAspCore.Data.Extensions;
using CleanAspCore.Data.Features.Employees;
using CleanAspCore.Data.Models.Employees;
using CleanAspCore.Extensions.FluentValidation;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.EntityFrameworkCore;
using NotFound = Microsoft.AspNetCore.Http.HttpResults.NotFound;

namespace CleanAspCore.Features.Employees.Endpoints;
namespace CleanAspCore.Endpoints.Employees;

/// <summary>
/// A request to update a employee.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using CleanAspCore.Data;
using CleanAspCore.Data.Features.Jobs;
using CleanAspCore.Data.Models.Jobs;
using CleanAspCore.Extensions.FluentValidation;
using Microsoft.AspNetCore.Http.HttpResults;

namespace CleanAspCore.Features.Jobs.Endpoints;
namespace CleanAspCore.Endpoints.Jobs;

/// <summary>
/// A request to create a new job.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using CleanAspCore.Data;
using CleanAspCore.Data.Features.Jobs;
using CleanAspCore.Data.Models.Jobs;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.EntityFrameworkCore;

namespace CleanAspCore.Features.Jobs.Endpoints;
namespace CleanAspCore.Endpoints.Jobs;

/// <summary>
/// The get job response.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using CleanAspCore.Features.Jobs.Endpoints;
using CleanAspCore.Utils;
using CleanAspCore.Utils;

namespace CleanAspCore.Features.Jobs;
namespace CleanAspCore.Endpoints.Jobs;

internal static class Routes
{
Expand Down
8 changes: 4 additions & 4 deletions CleanAspCore/Routes.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using CleanAspCore.Features.Departments;
using CleanAspCore.Features.Employees;
using CleanAspCore.Features.Jobs;
using CleanAspCore.Endpoints.Departments;
using CleanAspCore.Endpoints.Employees;
using CleanAspCore.Endpoints.Jobs;

namespace CleanAspCore;

public static class Routes
internal static class Routes
{
internal static void AddAppRoutes(this IEndpointRouteBuilder host)
{
Expand Down

0 comments on commit ca5e102

Please sign in to comment.