From a05b65e2b987ff9ad7492e5077713e59d2715013 Mon Sep 17 00:00:00 2001 From: 1234 <1234@LAPTOP-4FV9MDDA> Date: Tue, 30 Apr 2024 19:18:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=AF=20=D0=B2=D1=81=D0=B5=D0=B3=D0=B4=D0=B0?= =?UTF-8?q?=20=D1=85=D0=BE=D1=82=D0=B5=D0=BB=20=D0=B1=D1=8B=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B2=D1=8B=D0=BC=20=D0=B4=D0=B0...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- University/University.sln | 6 ++++++ .../UniversityDataModels/HelperInterfaces/IId.cs | 7 +++++++ University/UniversityDataModels/IClientModel.cs | 11 +++++++++++ University/UniversityDataModels/IDirectorModel.cs | 8 ++++++++ .../UniversityDataModels/IRequirementModel.cs | 15 +++++++++++++++ .../ProxyModels/RequirementByDisciplineModel.cs | 14 ++++++++++++++ .../UniversityDataModels.csproj | 9 +++++++++ 7 files changed, 70 insertions(+) create mode 100644 University/UniversityDataModels/HelperInterfaces/IId.cs create mode 100644 University/UniversityDataModels/IClientModel.cs create mode 100644 University/UniversityDataModels/IDirectorModel.cs create mode 100644 University/UniversityDataModels/IRequirementModel.cs create mode 100644 University/UniversityDataModels/ProxyModels/RequirementByDisciplineModel.cs create mode 100644 University/UniversityDataModels/UniversityDataModels.csproj diff --git a/University/University.sln b/University/University.sln index b7fc49d..feb9f66 100644 --- a/University/University.sln +++ b/University/University.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.9.34701.34 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "University", "University\University.csproj", "{AB3D7409-2E5B-4ABC-8849-935C708658E1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversityDataModels", "UniversityDataModels\UniversityDataModels.csproj", "{213B879D-95E6-4554-8C05-DF591E9006FF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {AB3D7409-2E5B-4ABC-8849-935C708658E1}.Debug|Any CPU.Build.0 = Debug|Any CPU {AB3D7409-2E5B-4ABC-8849-935C708658E1}.Release|Any CPU.ActiveCfg = Release|Any CPU {AB3D7409-2E5B-4ABC-8849-935C708658E1}.Release|Any CPU.Build.0 = Release|Any CPU + {213B879D-95E6-4554-8C05-DF591E9006FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {213B879D-95E6-4554-8C05-DF591E9006FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {213B879D-95E6-4554-8C05-DF591E9006FF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {213B879D-95E6-4554-8C05-DF591E9006FF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/University/UniversityDataModels/HelperInterfaces/IId.cs b/University/UniversityDataModels/HelperInterfaces/IId.cs new file mode 100644 index 0000000..1b927b0 --- /dev/null +++ b/University/UniversityDataModels/HelperInterfaces/IId.cs @@ -0,0 +1,7 @@ +namespace UniversityDataModels.HelperInterfaces +{ + public interface IId + { + int Id { get; } + } +} diff --git a/University/UniversityDataModels/IClientModel.cs b/University/UniversityDataModels/IClientModel.cs new file mode 100644 index 0000000..739a765 --- /dev/null +++ b/University/UniversityDataModels/IClientModel.cs @@ -0,0 +1,11 @@ +using UniversityDataModels.HelperInterfaces; + +namespace UniversityDataModels +{ + public interface IClientModel : IId + { + int DirectorId { get; } + string Name { get; } + int Course { get; } + } +} diff --git a/University/UniversityDataModels/IDirectorModel.cs b/University/UniversityDataModels/IDirectorModel.cs new file mode 100644 index 0000000..67e253d --- /dev/null +++ b/University/UniversityDataModels/IDirectorModel.cs @@ -0,0 +1,8 @@ +using UniversityDataModels.HelperInterfaces; + +namespace UniversityDataModels +{ + public interface IDirectorModel : IUser + { + } +} diff --git a/University/UniversityDataModels/IRequirementModel.cs b/University/UniversityDataModels/IRequirementModel.cs new file mode 100644 index 0000000..0458f08 --- /dev/null +++ b/University/UniversityDataModels/IRequirementModel.cs @@ -0,0 +1,15 @@ +using UniversityDataModels.HelperInterfaces; +using UniversityDataModels.ProxyModels; + +namespace UniversityDataModels +{ + public interface IRequirementModel : IId + { + int DirectorId { get; } + string NameOfRequirement { get; } + double Price { get; } + + // Сущности не использует интерфейс,чтобы не было проблем с сериализацией + Dictionary DisciplinesModels { get; } + } +} diff --git a/University/UniversityDataModels/ProxyModels/RequirementByDisciplineModel.cs b/University/UniversityDataModels/ProxyModels/RequirementByDisciplineModel.cs new file mode 100644 index 0000000..6005430 --- /dev/null +++ b/University/UniversityDataModels/ProxyModels/RequirementByDisciplineModel.cs @@ -0,0 +1,14 @@ +using UniversityDataModels.HelperInterfaces; + +namespace UniversityDataModels.ProxyModels +{ + public class RequirementByDisciplineModel : IId + { + public virtual int Id { get; set; } + + public virtual int RequirementId { get; set; } + public virtual int DisciplineId { get; set; } + + public virtual int Count { get; set; } + } +} diff --git a/University/UniversityDataModels/UniversityDataModels.csproj b/University/UniversityDataModels/UniversityDataModels.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/University/UniversityDataModels/UniversityDataModels.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + +