From 751b08e805043ae7caa4945099ad8e279ff145cb Mon Sep 17 00:00:00 2001 From: shept Date: Tue, 25 Mar 2025 19:42:06 +0500 Subject: [PATCH] added Infrastructure --- SurveyBackend/SurveyBackend.Core/Models/Group.cs | 9 +++++++++ SurveyBackend/SurveyBackend.Core/Models/User.cs | 4 +++- .../SurveyBackend.Infrastructure.csproj | 9 +++++++++ SurveyBackend/SurveyBackend.sln | 6 ++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 SurveyBackend/SurveyBackend.Core/Models/Group.cs create mode 100644 SurveyBackend/SurveyBackend.Infrastructure/SurveyBackend.Infrastructure.csproj diff --git a/SurveyBackend/SurveyBackend.Core/Models/Group.cs b/SurveyBackend/SurveyBackend.Core/Models/Group.cs new file mode 100644 index 0000000..e74cb3f --- /dev/null +++ b/SurveyBackend/SurveyBackend.Core/Models/Group.cs @@ -0,0 +1,9 @@ +namespace SurveyBackend.Core.Models; + +public class Group +{ + public int Id { get; set; } + public string Label { get; set; } + + public ICollection Users { get; set; } +} \ No newline at end of file diff --git a/SurveyBackend/SurveyBackend.Core/Models/User.cs b/SurveyBackend/SurveyBackend.Core/Models/User.cs index 509c503..fd8e2fd 100644 --- a/SurveyBackend/SurveyBackend.Core/Models/User.cs +++ b/SurveyBackend/SurveyBackend.Core/Models/User.cs @@ -6,6 +6,8 @@ public class User public string Username { get; set; } public string Email { get; set; } - public byte[] PasswordHash { get; set; } public byte[] PasswordSalt { get; set; } + public byte[] PasswordHash { get; set; } + + public ICollection Groups { get; set; } } \ No newline at end of file diff --git a/SurveyBackend/SurveyBackend.Infrastructure/SurveyBackend.Infrastructure.csproj b/SurveyBackend/SurveyBackend.Infrastructure/SurveyBackend.Infrastructure.csproj new file mode 100644 index 0000000..3a63532 --- /dev/null +++ b/SurveyBackend/SurveyBackend.Infrastructure/SurveyBackend.Infrastructure.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/SurveyBackend/SurveyBackend.sln b/SurveyBackend/SurveyBackend.sln index a7701f0..c79d7d1 100644 --- a/SurveyBackend/SurveyBackend.sln +++ b/SurveyBackend/SurveyBackend.sln @@ -4,6 +4,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurveyBackend.API", "Survey EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurveyBackend.Core", "SurveyBackend.Core\SurveyBackend.Core.csproj", "{596B4603-4066-4FF2-9C96-5357193F7229}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SurveyBackend.Infrastructure", "SurveyBackend.Infrastructure\SurveyBackend.Infrastructure.csproj", "{4006471D-9F65-4AD6-852B-88A1211B49F4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -18,5 +20,9 @@ Global {596B4603-4066-4FF2-9C96-5357193F7229}.Debug|Any CPU.Build.0 = Debug|Any CPU {596B4603-4066-4FF2-9C96-5357193F7229}.Release|Any CPU.ActiveCfg = Release|Any CPU {596B4603-4066-4FF2-9C96-5357193F7229}.Release|Any CPU.Build.0 = Release|Any CPU + {4006471D-9F65-4AD6-852B-88A1211B49F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4006471D-9F65-4AD6-852B-88A1211B49F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4006471D-9F65-4AD6-852B-88A1211B49F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4006471D-9F65-4AD6-852B-88A1211B49F4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal