diff --git a/School/School.sln b/School/School.sln index 3aff77e..e433f48 100644 --- a/School/School.sln +++ b/School/School.sln @@ -3,9 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.2.32602.215 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchoolApp", "SchoolApp\SchoolApp.csproj", "{9E7F8CCA-B349-49EC-B85E-D54299CC2759}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SchoolApp", "SchoolApp\SchoolApp.csproj", "{9E7F8CCA-B349-49EC-B85E-D54299CC2759}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchoolDataModels", "SchoolsDataModels\SchoolDataModels.csproj", "{ADBB4992-BE2F-4B10-83CC-335E5B92EA35}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SchoolDataModels", "SchoolsDataModels\SchoolDataModels.csproj", "{ADBB4992-BE2F-4B10-83CC-335E5B92EA35}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SchoolContracts", "SchoolContracts\SchoolContracts.csproj", "{D58B0AFE-E28D-4583-B9F1-C0EDF443243F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -21,6 +23,10 @@ Global {ADBB4992-BE2F-4B10-83CC-335E5B92EA35}.Debug|Any CPU.Build.0 = Debug|Any CPU {ADBB4992-BE2F-4B10-83CC-335E5B92EA35}.Release|Any CPU.ActiveCfg = Release|Any CPU {ADBB4992-BE2F-4B10-83CC-335E5B92EA35}.Release|Any CPU.Build.0 = Release|Any CPU + {D58B0AFE-E28D-4583-B9F1-C0EDF443243F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D58B0AFE-E28D-4583-B9F1-C0EDF443243F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D58B0AFE-E28D-4583-B9F1-C0EDF443243F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D58B0AFE-E28D-4583-B9F1-C0EDF443243F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/School/SchoolContracts/BindingModels/AchievementBindingModel.cs b/School/SchoolContracts/BindingModels/AchievementBindingModel.cs new file mode 100644 index 0000000..2bd774e --- /dev/null +++ b/School/SchoolContracts/BindingModels/AchievementBindingModel.cs @@ -0,0 +1,20 @@ +using SchoolDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolContracts.BindingModels +{ + internal class AchievementBindingModel : IAchievementModel + { + public int Id { get; set; } + public int LessonId { get; set; } + public string Name { get; set; } = string.Empty; + + public string Description { get; set; } = string.Empty; + + public DateTime ReceiptDate { get; set; } + } +} diff --git a/School/SchoolContracts/BindingModels/InterestBindingModel.cs b/School/SchoolContracts/BindingModels/InterestBindingModel.cs new file mode 100644 index 0000000..a78d981 --- /dev/null +++ b/School/SchoolContracts/BindingModels/InterestBindingModel.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SchoolDataModels.Models; + +namespace SchoolContracts.BindingModels +{ + public class InterestBindingModel : IInterestModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public string Direction { get; set; } = string.Empty; + public string Discription { get; set; } = string.Empty; + public Dictionary InterestLessons + { + get; + set; + } = new(); + } +} diff --git a/School/SchoolContracts/BindingModels/LessonBindingModel.cs b/School/SchoolContracts/BindingModels/LessonBindingModel.cs new file mode 100644 index 0000000..fcaf4f7 --- /dev/null +++ b/School/SchoolContracts/BindingModels/LessonBindingModel.cs @@ -0,0 +1,21 @@ +using SchoolDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolContracts.BindingModels +{ + public class LessonBindingModel : ILessonModel + { + public int Id { get; set; } + + public int UserId { get; set; } + + public DateTime TimeStart { get; set; } + + public DateTime TimeEnd { get; set; } + + } +} diff --git a/School/SchoolContracts/BindingModels/UserBindingModel.cs b/School/SchoolContracts/BindingModels/UserBindingModel.cs new file mode 100644 index 0000000..1898c92 --- /dev/null +++ b/School/SchoolContracts/BindingModels/UserBindingModel.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SchoolDataModels.Models; + + +namespace SchoolContracts.BindingModels +{ + public class UserBindingModel : IUserModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + + public DateTime BirthDate { get; set; } + + public string Mail { get; set; } = string.Empty; + + public string PhoneNumber { get; set; } = string.Empty; + + public string Password { get; set; } = string.Empty; + } +} diff --git a/School/SchoolContracts/SchoolContracts.csproj b/School/SchoolContracts/SchoolContracts.csproj new file mode 100644 index 0000000..8172c1c --- /dev/null +++ b/School/SchoolContracts/SchoolContracts.csproj @@ -0,0 +1,20 @@ + + + + net6.0 + enable + enable + + + + + + + + + + + + + + diff --git a/School/SchoolsDataModels/IId.cs b/School/SchoolsDataModels/IId.cs index cda7e6d..bfaba1a 100644 --- a/School/SchoolsDataModels/IId.cs +++ b/School/SchoolsDataModels/IId.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace SchoolDataModels { - internal interface IId + public interface IId { int Id { get; } diff --git a/School/SchoolsDataModels/Models/IAchievementModel.cs b/School/SchoolsDataModels/Models/IAchievementModel.cs index d715d2a..ab67b9b 100644 --- a/School/SchoolsDataModels/Models/IAchievementModel.cs +++ b/School/SchoolsDataModels/Models/IAchievementModel.cs @@ -6,11 +6,11 @@ using System.Threading.Tasks; namespace SchoolDataModels.Models { - internal interface IAchievementModel + public interface IAchievementModel : IId { + int LessonId { get; } string Name { get; } string Description { get; } - int UserId { get; } DateTime ReceiptDate { get; } } } diff --git a/School/SchoolsDataModels/Models/IInterestModel.cs b/School/SchoolsDataModels/Models/IInterestModel.cs index 2dead19..21e882f 100644 --- a/School/SchoolsDataModels/Models/IInterestModel.cs +++ b/School/SchoolsDataModels/Models/IInterestModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace SchoolDataModels.Models { - internal interface IInterestModel + public interface IInterestModel : IId { string Name { get; } @@ -14,5 +14,6 @@ namespace SchoolDataModels.Models string Discription { get; } + Dictionary InterestLessons { get; } } } diff --git a/School/SchoolsDataModels/Models/ILessonModel.cs b/School/SchoolsDataModels/Models/ILessonModel.cs index 49739d1..49c6379 100644 --- a/School/SchoolsDataModels/Models/ILessonModel.cs +++ b/School/SchoolsDataModels/Models/ILessonModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace SchoolDataModels.Models { - internal interface ILessonModel + public interface ILessonModel : IId { int UserId { get; } DateTime TimeStart { get; } diff --git a/School/SchoolsDataModels/Models/IUserModel.cs b/School/SchoolsDataModels/Models/IUserModel.cs index 1e629da..5008d28 100644 --- a/School/SchoolsDataModels/Models/IUserModel.cs +++ b/School/SchoolsDataModels/Models/IUserModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace SchoolDataModels.Models { - internal interface IUserModel + public interface IUserModel : IId { string Name { get; } DateTime BirthDate { get; }