From 231839d439cda41b74735e5420660bdc3c066db9 Mon Sep 17 00:00:00 2001 From: MaxKarme <91691525+MaxKarme@users.noreply.github.com> Date: Sun, 9 Apr 2023 00:09:22 +0400 Subject: [PATCH] refactoring models and cotracts --- .../BindingModels/ExaminationResultBindingModel.cs | 1 + .../UniversityContracts/BindingModels/StudentBindingModel.cs | 1 - .../SearchModels/ExaminationResultSearchModel.cs | 2 ++ .../UniversityContracts/SearchModels/StatementSearchModel.cs | 2 ++ .../ViewModels/ExaminationResultViewModel.cs | 1 + University/UniversityContracts/ViewModels/StudentViewModel.cs | 1 - .../UniversityDataModels/Models/IExaminationResultModel.cs | 1 + University/UniversityDataModels/Models/IStudentModel.cs | 1 - 8 files changed, 7 insertions(+), 3 deletions(-) diff --git a/University/UniversityContracts/BindingModels/ExaminationResultBindingModel.cs b/University/UniversityContracts/BindingModels/ExaminationResultBindingModel.cs index 8fbd495..372056d 100644 --- a/University/UniversityContracts/BindingModels/ExaminationResultBindingModel.cs +++ b/University/UniversityContracts/BindingModels/ExaminationResultBindingModel.cs @@ -9,5 +9,6 @@ namespace UniversityContracts.BindingModels public string ExaminationForm { get; set; } = String.Empty; public MarkType Mark { get; set; } = MarkType.Неизвестен; public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + public Dictionary Students { get; set; } = new(); } } diff --git a/University/UniversityContracts/BindingModels/StudentBindingModel.cs b/University/UniversityContracts/BindingModels/StudentBindingModel.cs index f3d682b..884775e 100644 --- a/University/UniversityContracts/BindingModels/StudentBindingModel.cs +++ b/University/UniversityContracts/BindingModels/StudentBindingModel.cs @@ -7,7 +7,6 @@ namespace UniversityContracts.BindingModels public int Id { get; set; } public string Name { get; set; } = String.Empty; public string RecordCardNumber { get; set; } = String.Empty; - public Dictionary Results { get; set; } = new(); public Dictionary Statements { get; set; } = new(); } } diff --git a/University/UniversityContracts/SearchModels/ExaminationResultSearchModel.cs b/University/UniversityContracts/SearchModels/ExaminationResultSearchModel.cs index 4f27f9f..822f3ec 100644 --- a/University/UniversityContracts/SearchModels/ExaminationResultSearchModel.cs +++ b/University/UniversityContracts/SearchModels/ExaminationResultSearchModel.cs @@ -6,5 +6,7 @@ namespace UniversityContracts.SearchModels public class ExaminationResultSearchModel { public int? Id { get; set; } + DateTime? From { get; set; } + DateTime? To { get; set; } } } diff --git a/University/UniversityContracts/SearchModels/StatementSearchModel.cs b/University/UniversityContracts/SearchModels/StatementSearchModel.cs index 7c3ca9d..7b2a0b1 100644 --- a/University/UniversityContracts/SearchModels/StatementSearchModel.cs +++ b/University/UniversityContracts/SearchModels/StatementSearchModel.cs @@ -5,5 +5,7 @@ namespace UniversityContracts.SearchModels public class StatementSearchModel { public int? Id { get; set; } + DateTime? From { get; set; } + DateTime? To { get; set; } } } diff --git a/University/UniversityContracts/ViewModels/ExaminationResultViewModel.cs b/University/UniversityContracts/ViewModels/ExaminationResultViewModel.cs index 379ac90..98817e6 100644 --- a/University/UniversityContracts/ViewModels/ExaminationResultViewModel.cs +++ b/University/UniversityContracts/ViewModels/ExaminationResultViewModel.cs @@ -9,5 +9,6 @@ namespace UniversityContracts.ViewModels public string ExaminationForm { get; set; } = String.Empty; public MarkType Mark { get; set; } = MarkType.Неизвестен; public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + public Dictionary Students { get; set; } = new(); } } diff --git a/University/UniversityContracts/ViewModels/StudentViewModel.cs b/University/UniversityContracts/ViewModels/StudentViewModel.cs index 3c44bff..4cfc34d 100644 --- a/University/UniversityContracts/ViewModels/StudentViewModel.cs +++ b/University/UniversityContracts/ViewModels/StudentViewModel.cs @@ -7,7 +7,6 @@ namespace UniversityContracts.ViewModels public int Id { get; set; } public string Name { get; set; } = String.Empty; public string RecordCardNumber { get; set; } = String.Empty; - public Dictionary Results { get; set; } = new(); public Dictionary Statements { get; set; } = new(); } } diff --git a/University/UniversityDataModels/Models/IExaminationResultModel.cs b/University/UniversityDataModels/Models/IExaminationResultModel.cs index c3c33e1..6180c87 100644 --- a/University/UniversityDataModels/Models/IExaminationResultModel.cs +++ b/University/UniversityDataModels/Models/IExaminationResultModel.cs @@ -6,5 +6,6 @@ namespace UniversityDataModels.Models String ExaminationForm { get; } MarkType Mark { get; } DateTime Date { get; } + Dictionary Students { get; } } } diff --git a/University/UniversityDataModels/Models/IStudentModel.cs b/University/UniversityDataModels/Models/IStudentModel.cs index 1ff6eb5..d296aaa 100644 --- a/University/UniversityDataModels/Models/IStudentModel.cs +++ b/University/UniversityDataModels/Models/IStudentModel.cs @@ -4,7 +4,6 @@ { String Name { get; } String RecordCardNumber { get; } - Dictionary Results { get; } Dictionary Statements { get; } } }