This commit is contained in:
MaxKarme 2023-04-02 18:16:40 +04:00
commit d6faa35d6d
25 changed files with 117 additions and 69 deletions

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.BindingModels
{
public class ActivityBindingModel : IActivityModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; }
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; set; }
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.BindingModels
{
public class DisciplineBindingModel : IDisciplineModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string Department { get; } = String.Empty;
public int Id { get; set; }
public string Name { get; set; } = String.Empty;
public string Department { get; set; } = String.Empty;
}
}

View File

@ -5,9 +5,9 @@ namespace UniversityContracts.BindingModels
{
public class ExaminationResultBindingModel : IExaminationResultModel
{
public int Id { get; }
public string ExaminationForm { get; } = String.Empty;
public MarkType Mark { get; } = MarkType.Неизвестен;
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Id { get; set; }
public string ExaminationForm { get; set; } = String.Empty;
public MarkType Mark { get; set; } = MarkType.Неизвестен;
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
}
}

View File

@ -4,7 +4,7 @@ namespace UniversityContracts.BindingModels
{
public class ReportTypeBindingModel : IReportTypeModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public int Id { get; set; }
public string Name { get; set; } = String.Empty;
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.BindingModels
{
public class StatementBindingModel : IStatementModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; }
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; set; }
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.BindingModels
{
public class StudentBindingModel : IStudentModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string RecordCardNumber { get; } = String.Empty;
public int Id { get; set; }
public string Name { get; set; } = String.Empty;
public string RecordCardNumber { get; set; } = String.Empty;
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.SearchModels
{
public class ActivitySearchModel : IActivityModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; }
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; set; }
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.SearchModels
{
public class DisciplineSearchModel : IDisciplineModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string Department { get; } = String.Empty;
public int Id { get; set; }
public string Name { get; set; } = String.Empty;
public string Department { get; set; } = String.Empty;
}
}

View File

@ -5,9 +5,9 @@ namespace UniversityContracts.SearchModels
{
public class ExaminationResultSearchModel : IExaminationResultModel
{
public int Id { get; }
public string ExaminationForm { get; } = String.Empty;
public MarkType Mark { get; } = MarkType.Неизвестен;
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Id { get; set; }
public string ExaminationForm { get; set; } = String.Empty;
public MarkType Mark { get; set; } = MarkType.Неизвестен;
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
}
}

View File

@ -4,7 +4,7 @@ namespace UniversityContracts.SearchModels
{
public class ReportTypeSearchModel : IReportTypeModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public int Id { get; set; }
public string Name { get; set; } = String.Empty;
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.SearchModels
{
public class StatementSearchModel : IStatementModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; }
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; set; }
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.SearchModels
{
public class StudentSearchModel : IStudentModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string RecordCardNumber { get; } = String.Empty;
public int Id { get; set; }
public string Name { get; set; } = String.Empty;
public string RecordCardNumber { get; set; } = String.Empty;
}
}

View File

@ -1,8 +1,16 @@
using UniversityDataModels.Models;
using UniversityContracts.BindingModels;
using UniversityContracts.SearchModels;
using UniversityContracts.ViewModels;
namespace UniversityContracts.StoragesContracts
{
public interface IActivityStorage
{
List<ActivityViewModel> GetFullList();
List<ActivityViewModel> GetFilteredList(ActivitySearchModel model);
ActivityViewModel? GetElement(ActivitySearchModel model);
ActivityViewModel? Insert(ActivityBindingModel model);
ActivityViewModel? Update(ActivityBindingModel model);
ActivityViewModel? Delete(ActivityBindingModel model);
}
}

View File

@ -1,8 +1,16 @@
using UniversityDataModels.Models;
using UniversityContracts.BindingModels;
using UniversityContracts.SearchModels;
using UniversityContracts.ViewModels;
namespace UniversityContracts.StoragesContracts
{
public interface IDisciplineStorage
{
List<DisciplineViewModel> GetFullList();
List<DisciplineViewModel> GetFilteredList(DisciplineSearchModel model);
DisciplineViewModel? GetElement(DisciplineSearchModel model);
DisciplineViewModel? Insert(DisciplineBindingModel model);
DisciplineViewModel? Update(DisciplineBindingModel model);
DisciplineViewModel? Delete(DisciplineBindingModel model);
}
}

View File

@ -1,8 +1,16 @@
using UniversityDataModels.Models;
using UniversityContracts.BindingModels;
using UniversityContracts.SearchModels;
using UniversityContracts.ViewModels;
namespace UniversityContracts.StoragesContracts
{
public interface IExaminationResultStorage
{
List<ExaminationResultViewModel> GetFullList();
List<ExaminationResultViewModel> GetFilteredList(ExaminationResultSearchModel model);
ExaminationResultViewModel? GetElement(ExaminationResultSearchModel model);
ExaminationResultViewModel? Insert(ExaminationResultBindingModel model);
ExaminationResultViewModel? Update(ExaminationResultBindingModel model);
ExaminationResultViewModel? Delete(ExaminationResultBindingModel model);
}
}

View File

@ -1,8 +1,16 @@
using UniversityDataModels.Models;
using UniversityContracts.BindingModels;
using UniversityContracts.SearchModels;
using UniversityContracts.ViewModels;
namespace UniversityContracts.StoragesContracts
{
public interface IReportTypeStorage
{
List<ReportTypeViewModel> GetFullList();
List<ReportTypeViewModel> GetFilteredList(ReportTypeSearchModel model);
ReportTypeViewModel? GetElement(ReportTypeSearchModel model);
ReportTypeViewModel? Insert(ReportTypeBindingModel model);
ReportTypeViewModel? Update(ReportTypeBindingModel model);
ReportTypeViewModel? Delete(ReportTypeBindingModel model);
}
}

View File

@ -1,8 +1,16 @@
using UniversityDataModels.Models;
using UniversityContracts.BindingModels;
using UniversityContracts.SearchModels;
using UniversityContracts.ViewModels;
namespace UniversityContracts.StoragesContracts
{
public interface IStatementStorage
{
List<StatementViewModel> GetFullList();
List<StatementViewModel> GetFilteredList(StatementSearchModel model);
StatementViewModel? GetElement(StatementSearchModel model);
StatementViewModel? Insert(StatementBindingModel model);
StatementViewModel? Update(StatementBindingModel model);
StatementViewModel? Delete(StatementBindingModel model);
}
}

View File

@ -1,8 +1,16 @@
using UniversityDataModels.Models;
using UniversityContracts.BindingModels;
using UniversityContracts.SearchModels;
using UniversityContracts.ViewModels;
namespace UniversityContracts.StoragesContracts
{
public interface IStudentStorage
{
List<StudentViewModel> GetFullList();
List<StudentViewModel> GetFilteredList(StudentSearchModel model);
StudentViewModel? GetElement(StudentSearchModel model);
StudentViewModel? Insert(StudentBindingModel model);
StudentViewModel? Update(StudentBindingModel model);
StudentViewModel? Delete(StudentBindingModel model);
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.ViewModels
{
public class ActivityViewModel : IActivityModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; }
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; set; }
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.ViewModels
{
public class DisciplineViewModel : IDisciplineModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string Department { get; } = String.Empty;
public int Id { get; set; }
public string Name { get; set; } = String.Empty;
public string Department { get; set; } = String.Empty;
}
}

View File

@ -1,13 +0,0 @@
using UniversityDataModels.Enums;
using UniversityDataModels.Models;
namespace UniversityContracts.ViewModels
{
public class ExaminationResultSearchModel : IExaminationResultModel
{
public int Id { get; }
public string ExaminationForm { get; } = String.Empty;
public MarkType Mark { get; } = MarkType.Неизвестен;
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
}
}

View File

@ -0,0 +1,13 @@
using UniversityDataModels.Enums;
using UniversityDataModels.Models;
namespace UniversityContracts.ViewModels
{
public class ExaminationResultViewModel : IExaminationResultModel
{
public int Id { get; set; }
public string ExaminationForm { get; set; } = String.Empty;
public MarkType Mark { get; set; } = MarkType.Неизвестен;
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
}
}

View File

@ -4,7 +4,7 @@ namespace UniversityContracts.ViewModels
{
public class ReportTypeViewModel : IReportTypeModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public int Id { get; set; }
public string Name { get; set; } = String.Empty;
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.ViewModels
{
public class StatementViewModel : IStatementModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; }
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; set; }
}
}

View File

@ -4,8 +4,8 @@ namespace UniversityContracts.ViewModels
{
public class StudentViewModel : IStatementModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; }
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; set; }
}
}