-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
2,954 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "src\Domain\Domain.csproj", "{84F8DBE3-ACF4-49A7-AB89-97A97BF6C351}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "src\Infrastructure\Infrastructure.csproj", "{B358A8CE-2718-4056-94AA-D5A40DD67AEF}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application", "src\Application\Application.csproj", "{90C204C7-AB46-45E5-9AE0-912800436545}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web", "src\Web\Web.csproj", "{961DAD51-ECA7-4389-8CD8-04DC47720E37}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{84F8DBE3-ACF4-49A7-AB89-97A97BF6C351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{84F8DBE3-ACF4-49A7-AB89-97A97BF6C351}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{84F8DBE3-ACF4-49A7-AB89-97A97BF6C351}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{84F8DBE3-ACF4-49A7-AB89-97A97BF6C351}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{B358A8CE-2718-4056-94AA-D5A40DD67AEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{B358A8CE-2718-4056-94AA-D5A40DD67AEF}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{B358A8CE-2718-4056-94AA-D5A40DD67AEF}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{B358A8CE-2718-4056-94AA-D5A40DD67AEF}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{90C204C7-AB46-45E5-9AE0-912800436545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{90C204C7-AB46-45E5-9AE0-912800436545}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{90C204C7-AB46-45E5-9AE0-912800436545}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{90C204C7-AB46-45E5-9AE0-912800436545}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{961DAD51-ECA7-4389-8CD8-04DC47720E37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{961DAD51-ECA7-4389-8CD8-04DC47720E37}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{961DAD51-ECA7-4389-8CD8-04DC47720E37}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{961DAD51-ECA7-4389-8CD8-04DC47720E37}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace Application; | ||
|
||
public class Class1 | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace Domain; | ||
|
||
public class Class1 | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Domain.Constants; | ||
|
||
public static class AppRoles | ||
{ | ||
public const string Admin = nameof(Admin); | ||
public const string DataAdmin = nameof(DataAdmin); | ||
public const string DataAnalyst = nameof(DataAnalyst); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.7" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Entities\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Collections.Generic; | ||
using Domain.Constants; | ||
using Infrastructure.Entities; | ||
using Microsoft.AspNetCore.Identity; | ||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace Infrastructure.Data; | ||
|
||
public class ApplicationDbContext(DbContextOptions<ApplicationDbContext> dbContextOptions) | ||
: IdentityDbContext<AppUser>(dbContextOptions) | ||
{ | ||
protected override void OnModelCreating(ModelBuilder modelBuilder) | ||
{ | ||
base.OnModelCreating(modelBuilder); | ||
List<IdentityRole> roles = | ||
[ | ||
new IdentityRole { Name = AppRoles.Admin, NormalizedName = AppRoles.Admin.ToUpper()}, | ||
new IdentityRole { Name = AppRoles.DataAdmin, NormalizedName = AppRoles.DataAdmin.ToUpper()}, | ||
new IdentityRole { Name = AppRoles.DataAnalyst, NormalizedName = AppRoles.DataAnalyst.ToUpper()} | ||
]; | ||
modelBuilder.Entity<IdentityRole>().HasData(roles); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using Microsoft.AspNetCore.Identity; | ||
|
||
namespace Infrastructure.Entities; | ||
public class AppUser : IdentityUser | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.7" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Domain\Domain.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.