diff --git a/University/UniversityContracts/BindingModel/AttestationBindingModel.cs b/University/UniversityContracts/BindingModel/AttestationBindingModel.cs new file mode 100644 index 0000000..37408ea --- /dev/null +++ b/University/UniversityContracts/BindingModel/AttestationBindingModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityDataModels.Models; + +namespace UniversityContracts.BindingModel +{ + public class AttestationBindingModel : IAttestationModel + { + public int Id { get; set; } + public string FormOfEvaluation { get; set; } = string.Empty; + public string Score { get; set; } = string.Empty; + public int StudentId { get; set; } + } +} diff --git a/University/UniversityContracts/BindingModel/PlanOfStudyBindingModel.cs b/University/UniversityContracts/BindingModel/PlanOfStudyBindingModel.cs new file mode 100644 index 0000000..7c81892 --- /dev/null +++ b/University/UniversityContracts/BindingModel/PlanOfStudyBindingModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityDataModels.Models; + +namespace UniversityContracts.BindingModel +{ + public class PlanOfStudyBindingModel : IPlanOfStudyModel + { + public int Id { get; set; } + public string Profile { get; set; } = string.Empty; + public string FormOfStudy { get; set; } = string.Empty; + public int WorkerId { get; set; } + } +} diff --git a/University/UniversityContracts/BusinessLogicsContracts/IAttestationLogic.cs b/University/UniversityContracts/BusinessLogicsContracts/IAttestationLogic.cs new file mode 100644 index 0000000..8fd72fd --- /dev/null +++ b/University/UniversityContracts/BusinessLogicsContracts/IAttestationLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityContracts.BindingModel; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BusinessLogicsContracts +{ + internal interface IAttestationLogic + { + List? ReadList(AttestationSearchModel? model); + AttestationViewModel? ReadElement(AttestationSearchModel model); + bool Create(AttestationBindingModel model); + bool Update(AttestationBindingModel model); + bool Delete(AttestationBindingModel model); + } +} diff --git a/University/UniversityContracts/BusinessLogicsContracts/IPlanOfStudyLogic.cs b/University/UniversityContracts/BusinessLogicsContracts/IPlanOfStudyLogic.cs new file mode 100644 index 0000000..3fcdd72 --- /dev/null +++ b/University/UniversityContracts/BusinessLogicsContracts/IPlanOfStudyLogic.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityContracts.BindingModel; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.BusinessLogicsContracts +{ + internal interface IPlanOfStudyLogic + { + List? ReadList(PlanOfStudySearchModel? model); + PlanOfStudyViewModel? ReadElement(PlanOfStudySearchModel model); + bool Create(PlanOfStudyBindingModel model); + bool Update(PlanOfStudyBindingModel model); + bool Delete(PlanOfStudyBindingModel model); + } +} diff --git a/University/UniversityContracts/SearchModels/AttestationSearchModel.cs b/University/UniversityContracts/SearchModels/AttestationSearchModel.cs new file mode 100644 index 0000000..df13d0f --- /dev/null +++ b/University/UniversityContracts/SearchModels/AttestationSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace UniversityContracts.SearchModels +{ + public class AttestationSearchModel + { + public int? Id { get; set; } + public string? FormOfEvaluation { get; set; } + public string? Score { get; set; } + } +} diff --git a/University/UniversityContracts/SearchModels/PlanOfStudySearchModel.cs b/University/UniversityContracts/SearchModels/PlanOfStudySearchModel.cs new file mode 100644 index 0000000..9a4005c --- /dev/null +++ b/University/UniversityContracts/SearchModels/PlanOfStudySearchModel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace UniversityContracts.SearchModels +{ + public class PlanOfStudySearchModel + { + public int? Id { get; set; } + public string? Profile { get; set; } + } +} diff --git a/University/UniversityContracts/SearchModels/StudentSearchModel.cs b/University/UniversityContracts/SearchModels/StudentSearchModel.cs index daccb01..7e47e4c 100644 --- a/University/UniversityContracts/SearchModels/StudentSearchModel.cs +++ b/University/UniversityContracts/SearchModels/StudentSearchModel.cs @@ -1,4 +1,4 @@ -using University.DataModels.Models; +using UniversityDataModels.Models; namespace UniversityContracts.SearchModels { diff --git a/University/UniversityContracts/StorageContracts/IAttestationStorage.cs b/University/UniversityContracts/StorageContracts/IAttestationStorage.cs new file mode 100644 index 0000000..fab43f2 --- /dev/null +++ b/University/UniversityContracts/StorageContracts/IAttestationStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityContracts.BindingModel; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.StorageContracts +{ + public interface IAttestationStorage + { + List GetFullList(); + List GetFilteredList(AttestationSearchModel model); + AttestationViewModel? GetElement(AttestationSearchModel model); + AttestationViewModel? Insert(AttestationBindingModel model); + AttestationViewModel? Update(AttestationBindingModel model); + AttestationViewModel? Delete(AttestationBindingModel model); + } +} diff --git a/University/UniversityContracts/StorageContracts/IPlanOfStudyStorage.cs b/University/UniversityContracts/StorageContracts/IPlanOfStudyStorage.cs new file mode 100644 index 0000000..0c36c8f --- /dev/null +++ b/University/UniversityContracts/StorageContracts/IPlanOfStudyStorage.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityContracts.BindingModel; +using UniversityContracts.SearchModels; +using UniversityContracts.ViewModels; + +namespace UniversityContracts.StorageContracts +{ + public interface IPlanOfStudyStorage + { + List GetFullList(); + List GetFilteredList(PlanOfStudySearchModel model); + PlanOfStudyViewModel? GetElement(PlanOfStudySearchModel model); + PlanOfStudyViewModel? Insert(PlanOfStudyBindingModel model); + PlanOfStudyViewModel? Update(PlanOfStudyBindingModel model); + PlanOfStudyViewModel? Delete(PlanOfStudyBindingModel model); + } +} diff --git a/University/UniversityContracts/ViewModels/AttestationViewModel.cs b/University/UniversityContracts/ViewModels/AttestationViewModel.cs new file mode 100644 index 0000000..eaf6eb9 --- /dev/null +++ b/University/UniversityContracts/ViewModels/AttestationViewModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityDataModels.Models; + +namespace UniversityContracts.ViewModels +{ + public class AttestationViewModel : IAttestationModel + { + public int Id { get; set; } + public int StudentId { get; set; } + [DisplayName("Форма оценивания")] + public string FormOfEvaluation { get; set; } = string.Empty; + [DisplayName("Оценка")] + public string Score { get; set; } = string.Empty; + } +} diff --git a/University/UniversityContracts/ViewModels/PlanOfStudyViewModel.cs b/University/UniversityContracts/ViewModels/PlanOfStudyViewModel.cs new file mode 100644 index 0000000..dbb7b07 --- /dev/null +++ b/University/UniversityContracts/ViewModels/PlanOfStudyViewModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UniversityDataModels.Models; + +namespace UniversityContracts.ViewModels +{ + public class PlanOfStudyViewModel : IPlanOfStudyModel + { + public int Id { get; set; } + public int WorkerId { get; set; } + [DisplayName("Профиль")] + public string Profile { get; set; } = string.Empty; + [DisplayName("Форма обучения")] + public string FormOfStudy { get; set; } = string.Empty; + } +}