diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/DiyBindingModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/DiyBindingModel.cs new file mode 100644 index 0000000..2e334fc --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/DiyBindingModel.cs @@ -0,0 +1,27 @@ +using SchoolAgainStudyDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.BindingModel +{ + public class DiyBindingModel : IDiy + { + public string Title { get; set; } = string.Empty; + + public string Description { get; set; } = string.Empty; + + public DateTime DateCreate { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + + public int TaskId { get; set; } + public string TaskName { get; set; } = string.Empty; + + public int StudentId { get; set; } + + public Dictionary DiyInterests { get; set; } = new(); + + public int Id { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/InterestBindingModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/InterestBindingModel.cs new file mode 100644 index 0000000..a7f08d6 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/InterestBindingModel.cs @@ -0,0 +1,18 @@ +using SchoolAgainStudyDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.BindingModel +{ + public class InterestBindingModel : IInterest + { + public string Title { get; set; } = string.Empty; + + public string Description { get; set; } = string.Empty; + + public int Id { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/ProductBindingModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/ProductBindingModel.cs new file mode 100644 index 0000000..8c4ee18 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/ProductBindingModel.cs @@ -0,0 +1,24 @@ +using SchoolAgainStudyDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.BindingModel +{ + public class ProductBindingModel : IProduct + { + public string Title { get; set; } = string.Empty; + + public string Description { get; set; } = string.Empty; + + public DateTime DateCreate { get; set; } + + public int StudentId { get; set; } + + public Dictionary ProductInterests { get; set; } = new(); + + public int Id { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/StudentBindingModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/StudentBindingModel.cs new file mode 100644 index 0000000..d77ba13 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/BindingModel/StudentBindingModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SchoolAgainStudyDataModels.Models; +namespace SchoolAgainStudyContracts.BindingModel +{ + public class StudentBindingModel : IStudent + { + public string Name { get; set; } = string.Empty; + + public int Class { get; set; } + + public string Email { get; set; } = string.Empty; + + public string Login { get; set; } = string.Empty; + + public string Password { get; set; } = string.Empty; + + public Dictionary StudentInterests { get; set; } = new() ; + + public int Id { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IDiyLogic.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IDiyLogic.cs new file mode 100644 index 0000000..a94a29a --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IDiyLogic.cs @@ -0,0 +1,20 @@ +using SchoolAgainStudyContracts.BindingModel; +using SchoolAgainStudyContracts.SearchModel; +using SchoolAgainStudyContracts.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.BusinessLogicContracts +{ + public interface IDiyLogic + { + List? ReadList(DiySearchModel? model); + DiyViewModel? ReadElement(DiySearchModel model); + bool Create(DiyBindingModel model); + bool Update(DiyBindingModel model); + bool Delete(DiyBindingModel model); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IInterestLogic.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IInterestLogic.cs new file mode 100644 index 0000000..020d464 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IInterestLogic.cs @@ -0,0 +1,20 @@ +using SchoolAgainStudyContracts.BindingModel; +using SchoolAgainStudyContracts.SearchModel; +using SchoolAgainStudyContracts.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.BusinessLogicContracts +{ + public interface IInterestLogic + { + List? ReadList(InterestSearchModel? model); + InterestViewModel? ReadElement(InterestSearchModel model); + bool Create(InterestBindingModel model); + bool Update(InterestBindingModel model); + bool Delete(InterestBindingModel model); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IProductLogic.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IProductLogic.cs new file mode 100644 index 0000000..8cef927 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IProductLogic.cs @@ -0,0 +1,20 @@ +using SchoolAgainStudyContracts.BindingModel; +using SchoolAgainStudyContracts.SearchModel; +using SchoolAgainStudyContracts.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.BusinessLogicContracts +{ + public interface IProductLogic + { + List? ReadList(ProductSearchModel? model); + ProductViewModel? ReadElement(ProductSearchModel model); + bool Create(ProductBindingModel model); + bool Update(ProductBindingModel model); + bool Delete(ProductBindingModel model); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IStudentLogic.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IStudentLogic.cs new file mode 100644 index 0000000..6eaae28 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/BusinessLogicContracts/IStudentLogic.cs @@ -0,0 +1,20 @@ +using SchoolAgainStudyContracts.BindingModel; +using SchoolAgainStudyContracts.SearchModel; +using SchoolAgainStudyContracts.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.BusinessLogicContracts +{ + public interface IStudentLogic + { + List? ReadList(StudentSearchModel? model); + StudentViewModel? ReadElement(StudentSearchModel model); + bool Create(StudentBindingModel model); + bool Update(StudentBindingModel model); + bool Delete(StudentBindingModel model); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/DiySearchModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/DiySearchModel.cs new file mode 100644 index 0000000..eec05b7 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/DiySearchModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.SearchModel +{ + public class DiySearchModel + { + public int? Id { get; set; } + public string? Title { get; set; } + public DateTime? DateFrom { get; set; } + + public DateTime? DateTo { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/InterestSearchModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/InterestSearchModel.cs new file mode 100644 index 0000000..bcefc9a --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/InterestSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.SearchModel +{ + public class InterestSearchModel + { + public int? Id { get; set; } + public string? Title { get; set; } + + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/ProductSearchModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/ProductSearchModel.cs new file mode 100644 index 0000000..dc92f98 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/ProductSearchModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.SearchModel +{ + public class ProductSearchModel + { + public int? Id { get; set; } + public string? Title { get; set; } + public DateTime? DateFrom { get; set; } + + public DateTime? DateTo { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/StudentSearchModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/StudentSearchModel.cs new file mode 100644 index 0000000..4c2c44f --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/SearchModel/StudentSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.SearchModel +{ + public class StudentSearchModel + { + public int? Id { get; set; } + public string? Login { get; set; } + public string? Name { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IDiyStorage.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IDiyStorage.cs new file mode 100644 index 0000000..8123f2e --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IDiyStorage.cs @@ -0,0 +1,21 @@ +using SchoolAgainStudyContracts.BindingModel; +using SchoolAgainStudyContracts.SearchModel; +using SchoolAgainStudyContracts.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.StorageContracts +{ + public interface IDiyStorage + { + List GetFullList(); + List GetFilteredList(DiySearchModel model); + DiyViewModel? GetElement(DiySearchModel model); + DiyViewModel? Insert(DiyBindingModel model); + DiyViewModel? Update(DiyBindingModel model); + DiyViewModel? Delete(DiyBindingModel model); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IInterestStorage.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IInterestStorage.cs new file mode 100644 index 0000000..c705b32 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IInterestStorage.cs @@ -0,0 +1,21 @@ +using SchoolAgainStudyContracts.BindingModel; +using SchoolAgainStudyContracts.SearchModel; +using SchoolAgainStudyContracts.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.StorageContracts +{ + public interface IInterestStorage + { + List GetFullList(); + List GetFilteredList(InterestSearchModel model); + InterestViewModel? GetElement(InterestSearchModel model); + InterestViewModel? Insert(InterestBindingModel model); + InterestViewModel? Update(InterestBindingModel model); + InterestViewModel? Delete(InterestBindingModel model); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IProductStorage.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IProductStorage.cs new file mode 100644 index 0000000..ec1365f --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IProductStorage.cs @@ -0,0 +1,21 @@ +using SchoolAgainStudyContracts.BindingModel; +using SchoolAgainStudyContracts.SearchModel; +using SchoolAgainStudyContracts.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.StorageContracts +{ + public interface IProductStorage + { + List GetFullList(); + List GetFilteredList(ProductSearchModel model); + ProductViewModel? GetElement(ProductSearchModel model); + ProductViewModel? Insert(ProductBindingModel model); + ProductViewModel? Update(ProductBindingModel model); + ProductViewModel? Delete(ProductBindingModel model); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IStudentStorage.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IStudentStorage.cs new file mode 100644 index 0000000..232e71f --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/StorageContracts/IStudentStorage.cs @@ -0,0 +1,21 @@ +using SchoolAgainStudyContracts.BindingModel; +using SchoolAgainStudyContracts.SearchModel; +using SchoolAgainStudyContracts.ViewModel; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.StorageContracts +{ + public interface IStudentStorage + { + List GetFullList(); + List GetFilteredList(StudentSearchModel model); + StudentViewModel? GetElement(StudentSearchModel model); + StudentViewModel? Insert(StudentBindingModel model); + StudentViewModel? Update(StudentBindingModel model); + StudentViewModel? Delete(StudentBindingModel model); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/DiyViewModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/DiyViewModel.cs new file mode 100644 index 0000000..a21c3cd --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/DiyViewModel.cs @@ -0,0 +1,30 @@ +using SchoolAgainStudyDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.ViewModel +{ + public class DiyViewModel : IDiy + { + [DisplayName("Название")] + public string Title { get; set; } = string.Empty; + [DisplayName("Описание")] + public string Description { get; set; } = string.Empty; + [DisplayName("Дата создания")] + public DateTime DateCreate { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + + public int TaskId { get; set; } + [DisplayName("Задание")] + public string TaskName { get; set; } = string.Empty; + + public int StudentId { get; set; } + + public Dictionary DiyInterests { get; set; } = new(); + [DisplayName("Номер")] + public int Id { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/InterestViewModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/InterestViewModel.cs new file mode 100644 index 0000000..8f07702 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/InterestViewModel.cs @@ -0,0 +1,20 @@ +using SchoolAgainStudyDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.ViewModel +{ + public class InterestViewModel : IInterest + { + [DisplayName("Название")] + public string Title { get; set; } = string.Empty; + [DisplayName("Описание")] + public string Description { get; set; } = string.Empty; + [DisplayName("Номер")] + public int Id { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ProductViewModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ProductViewModel.cs new file mode 100644 index 0000000..02bd9c0 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ProductViewModel.cs @@ -0,0 +1,26 @@ +using SchoolAgainStudyDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.ViewModel +{ + public class ProductViewModel : IProduct + { + [DisplayName("Название")] + public string Title { get; set; } = string.Empty; + [DisplayName("Описание")] + public string Description { get; set; } = string.Empty; + [DisplayName("Дата создания")] + public DateTime DateCreate { get; set; } + + public int StudentId { get; set; } + + public Dictionary ProductInterests { get; set; } = new(); + [DisplayName("Номер")] + public int Id { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportInterestLessonViewModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportInterestLessonViewModel.cs new file mode 100644 index 0000000..0bb5840 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportInterestLessonViewModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.ViewModel +{ + public class ReportInterestLessonViewModel + { + public string Title { get; set; } = string.Empty; + public List Lessons { get; set; } = new(); + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportInterestViewModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportInterestViewModel.cs new file mode 100644 index 0000000..f8dce0f --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/ReportInterestViewModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SchoolAgainStudyContracts.ViewModel +{ + public class ReportInterestViewModel + { + public int Id { get; set; } + public string InterestTitle { get; set; } = string.Empty; + public string InterestDesc { get; set; } = string.Empty; + public string WorkType { get; set; } = string.Empty; + public string WorkTitle { get; set; } = string.Empty; + public string WorkDesc { get; set; } = string.Empty; + public DateTime DateCreate { get; set; } + } +} diff --git a/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/StudentViewModel.cs b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/StudentViewModel.cs new file mode 100644 index 0000000..18763a5 --- /dev/null +++ b/SchoolAgainStudy/SchoolAgainStudyContracts/ViewModel/StudentViewModel.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using SchoolAgainStudyDataModels.Models; +namespace SchoolAgainStudyContracts.ViewModel +{ + public class StudentViewModel : IStudent + { + [DisplayName("ФИО")] + public string Name { get; set; } = string.Empty; + [DisplayName("Класс")] + public int Class { get; set; } + [DisplayName("Почта")] + public string Email { get; set; } = string.Empty; + [DisplayName("Логин")] + public string Login { get; set; } = string.Empty; + [DisplayName("Пароль")] + public string Password { get; set; } = string.Empty; + + public Dictionary StudentInterests { get; set; } = new() ; + [DisplayName("Номер")] + public int Id { get; set; } + } +}