Контракты
This commit is contained in:
parent
e0203bf412
commit
01b2bc9960
25
TaskTrackerContracts/BindingModels/DirectionBindingModel.cs
Normal file
25
TaskTrackerContracts/BindingModels/DirectionBindingModel.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class DirectionBindingModel : IDirectionModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public Dictionary<int, (IStudentModel, int)> DirectionStudents
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = new();
|
||||||
|
|
||||||
|
public Dictionary<int, (ISubjectModel, int)> DirectionSubjects
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = new();
|
||||||
|
}
|
||||||
|
}
|
19
TaskTrackerContracts/BindingModels/ExamBindingModel.cs
Normal file
19
TaskTrackerContracts/BindingModels/ExamBindingModel.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ExamBindingModel : IExamModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int SubjectId { get; set; }
|
||||||
|
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
18
TaskTrackerContracts/BindingModels/ResultBindingModel.cs
Normal file
18
TaskTrackerContracts/BindingModels/ResultBindingModel.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ResultBindingModel : IResultModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int StudentId { get; set; }
|
||||||
|
|
||||||
|
public int SubjectId { get; set; }
|
||||||
|
public string Grade { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
16
TaskTrackerContracts/BindingModels/StudentBindingModel.cs
Normal file
16
TaskTrackerContracts/BindingModels/StudentBindingModel.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class StudentBindingModel : IStudentModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public DateTime DateBirth { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
};
|
||||||
|
}
|
15
TaskTrackerContracts/BindingModels/SubjectBindingModel.cs
Normal file
15
TaskTrackerContracts/BindingModels/SubjectBindingModel.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class SubjectBindingModel : ISubjectModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IDirectionLogic
|
||||||
|
{
|
||||||
|
List<DirectionViewModel>? ReadList(DirectionSearchModel? model);
|
||||||
|
|
||||||
|
DirectionViewModel? ReadElement(DirectionSearchModel model);
|
||||||
|
|
||||||
|
bool Create(DirectionBindingModel model);
|
||||||
|
|
||||||
|
bool Update(DirectionBindingModel model);
|
||||||
|
|
||||||
|
bool Delete(DirectionBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
24
TaskTrackerContracts/BusinessLogicsContracts/IExamLogic.cs
Normal file
24
TaskTrackerContracts/BusinessLogicsContracts/IExamLogic.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IExamLogic
|
||||||
|
{
|
||||||
|
List<ExamViewModel>? ReadList(ExamSearchModel? model);
|
||||||
|
|
||||||
|
ExamViewModel? ReadElement(ExamSearchModel model);
|
||||||
|
|
||||||
|
bool Create(ExamBindingModel model);
|
||||||
|
|
||||||
|
bool Update(ExamBindingModel model);
|
||||||
|
|
||||||
|
bool Delete(ExamBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
24
TaskTrackerContracts/BusinessLogicsContracts/IResultLogic.cs
Normal file
24
TaskTrackerContracts/BusinessLogicsContracts/IResultLogic.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IResultLogic
|
||||||
|
{
|
||||||
|
List<ResultViewModel>? ReadList(ResultSearchModel? model);
|
||||||
|
|
||||||
|
ResultViewModel? ReadElement(ResultSearchModel model);
|
||||||
|
|
||||||
|
bool Create(ResultBindingModel model);
|
||||||
|
|
||||||
|
bool Update(ResultBindingModel model);
|
||||||
|
|
||||||
|
bool Delete(ResultBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IStudentLogic
|
||||||
|
{
|
||||||
|
List<StudentViewModel>? ReadList(StudentSearchModel? model);
|
||||||
|
|
||||||
|
StudentViewModel? ReadElement(StudentSearchModel model);
|
||||||
|
|
||||||
|
bool Create(StudentBindingModel model);
|
||||||
|
|
||||||
|
bool Update(StudentBindingModel model);
|
||||||
|
|
||||||
|
bool Delete(StudentBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface ISubjectLogic
|
||||||
|
{
|
||||||
|
List<SubjectViewModel>? ReadList(SubjectSearchModel? model);
|
||||||
|
|
||||||
|
SubjectViewModel? ReadElement(SubjectSearchModel model);
|
||||||
|
|
||||||
|
bool Create(SubjectBindingModel model);
|
||||||
|
|
||||||
|
bool Update(SubjectBindingModel model);
|
||||||
|
|
||||||
|
bool Delete(SubjectBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
13
TaskTrackerContracts/SearchModels/DirectionSearchModel.cs
Normal file
13
TaskTrackerContracts/SearchModels/DirectionSearchModel.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class DirectionSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
13
TaskTrackerContracts/SearchModels/ExamSearchModel.cs
Normal file
13
TaskTrackerContracts/SearchModels/ExamSearchModel.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class ExamSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
13
TaskTrackerContracts/SearchModels/ResultSearchModel.cs
Normal file
13
TaskTrackerContracts/SearchModels/ResultSearchModel.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class ResultSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
13
TaskTrackerContracts/SearchModels/StudentSearchModel.cs
Normal file
13
TaskTrackerContracts/SearchModels/StudentSearchModel.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class StudentSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
13
TaskTrackerContracts/SearchModels/SubjectSearchModel.cs
Normal file
13
TaskTrackerContracts/SearchModels/SubjectSearchModel.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class SubjectSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
21
TaskTrackerContracts/StoragesContracts/IDirectionStorage.cs
Normal file
21
TaskTrackerContracts/StoragesContracts/IDirectionStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IDirectionStorage
|
||||||
|
{
|
||||||
|
List<DirectionBindingModel> GetFullList();
|
||||||
|
List<DirectionBindingModel> GetFilteredList(DirectionSearchModel model);
|
||||||
|
DirectionBindingModel? GetElement(DirectionSearchModel model);
|
||||||
|
DirectionBindingModel? Insert(DirectionBindingModel model);
|
||||||
|
DirectionBindingModel? Update(DirectionBindingModel model);
|
||||||
|
DirectionBindingModel? Delete(DirectionBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
21
TaskTrackerContracts/StoragesContracts/IExamStorage.cs
Normal file
21
TaskTrackerContracts/StoragesContracts/IExamStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IExamStorage
|
||||||
|
{
|
||||||
|
List<ExamBindingModel> GetFullList();
|
||||||
|
List<ExamBindingModel> GetFilteredList(ExamSearchModel model);
|
||||||
|
ExamBindingModel? GetElement(ExamSearchModel model);
|
||||||
|
ExamBindingModel? Insert(ExamBindingModel model);
|
||||||
|
ExamBindingModel? Update(ExamBindingModel model);
|
||||||
|
ExamBindingModel? Delete(ExamBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
21
TaskTrackerContracts/StoragesContracts/IResultStorage.cs
Normal file
21
TaskTrackerContracts/StoragesContracts/IResultStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IResultStorage
|
||||||
|
{
|
||||||
|
List<ResultBindingModel> GetFullList();
|
||||||
|
List<ResultBindingModel> GetFilteredList(ResultSearchModel model);
|
||||||
|
ResultBindingModel? GetElement(ResultSearchModel model);
|
||||||
|
ResultBindingModel? Insert(ResultBindingModel model);
|
||||||
|
ResultBindingModel? Update(ResultBindingModel model);
|
||||||
|
ResultBindingModel? Delete(ResultBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
21
TaskTrackerContracts/StoragesContracts/IStudentStorage.cs
Normal file
21
TaskTrackerContracts/StoragesContracts/IStudentStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IStudentStorage
|
||||||
|
{
|
||||||
|
List<StudentBindingModel> GetFullList();
|
||||||
|
List<StudentBindingModel> GetFilteredList(StudentSearchModel model);
|
||||||
|
StudentBindingModel? GetElement(StudentSearchModel model);
|
||||||
|
StudentBindingModel? Insert(StudentBindingModel model);
|
||||||
|
StudentBindingModel? Update(StudentBindingModel model);
|
||||||
|
StudentBindingModel? Delete(StudentBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
21
TaskTrackerContracts/StoragesContracts/ISubjectStorage.cs
Normal file
21
TaskTrackerContracts/StoragesContracts/ISubjectStorage.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerContracts.BindingModels;
|
||||||
|
using TaskTrackerContracts.SearchModels;
|
||||||
|
using TaskTrackerContracts.ViewModels;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface ISubjectStorage
|
||||||
|
{
|
||||||
|
List<SubjectBindingModel> GetFullList();
|
||||||
|
List<SubjectBindingModel> GetFilteredList(SubjectSearchModel model);
|
||||||
|
SubjectBindingModel? GetElement(SubjectSearchModel model);
|
||||||
|
SubjectBindingModel? Insert(SubjectBindingModel model);
|
||||||
|
SubjectBindingModel? Update(SubjectBindingModel model);
|
||||||
|
SubjectBindingModel? Delete(SubjectBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
25
TaskTrackerContracts/ViewModels/DirectionViewModel.cs
Normal file
25
TaskTrackerContracts/ViewModels/DirectionViewModel.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class DirectionViewModel : IDirectionModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public Dictionary<int, (IStudentModel, int)> DirectionStudents
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = new();
|
||||||
|
|
||||||
|
public Dictionary<int, (ISubjectModel, int)> DirectionSubjects
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = new();
|
||||||
|
}
|
||||||
|
}
|
19
TaskTrackerContracts/ViewModels/ExamViewModel.cs
Normal file
19
TaskTrackerContracts/ViewModels/ExamViewModel.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ExamViewModel : IExamModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int SubjectId { get; set; }
|
||||||
|
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
18
TaskTrackerContracts/ViewModels/ResultViewModel.cs
Normal file
18
TaskTrackerContracts/ViewModels/ResultViewModel.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ResultViewModel : IResultModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int StudentId { get; set; }
|
||||||
|
|
||||||
|
public int SubjectId { get; set; }
|
||||||
|
public string Grade { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
16
TaskTrackerContracts/ViewModels/StudentViewModel.cs
Normal file
16
TaskTrackerContracts/ViewModels/StudentViewModel.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class StudentViewModel : IStudentModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public DateTime DateBirth { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
};
|
||||||
|
}
|
15
TaskTrackerContracts/ViewModels/SubjectViewModel.cs
Normal file
15
TaskTrackerContracts/ViewModels/SubjectViewModel.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using TaskTrackerDataModels.Models;
|
||||||
|
|
||||||
|
namespace TaskTrackerContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class SubjectViewModel : ISubjectModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace TaskTrackerDataModels.Models
|
namespace TaskTrackerDataModels.Models
|
||||||
{
|
{
|
||||||
internal interface IDirectionModel : IId
|
public interface IDirectionModel : IId
|
||||||
{
|
{
|
||||||
Dictionary<int, (IStudentModel, int)> DirectionStudents { get; }
|
Dictionary<int, (IStudentModel, int)> DirectionStudents { get; }
|
||||||
Dictionary<int, (ISubjectModel, int)> DirectionSubjects { get; }
|
Dictionary<int, (ISubjectModel, int)> DirectionSubjects { get; }
|
||||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace TaskTrackerDataModels.Models
|
namespace TaskTrackerDataModels.Models
|
||||||
{
|
{
|
||||||
internal interface IExamModel : IId
|
public interface IExamModel : IId
|
||||||
{
|
{
|
||||||
int SubjectId { get; }
|
int SubjectId { get; }
|
||||||
DateTime Date { get; }
|
DateTime Date { get; }
|
||||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace TaskTrackerDataModels.Models
|
namespace TaskTrackerDataModels.Models
|
||||||
{
|
{
|
||||||
internal interface IResultModel : IId
|
public interface IResultModel : IId
|
||||||
{
|
{
|
||||||
string Grade { get; }
|
string Grade { get; }
|
||||||
int StudentId { get; }
|
int StudentId { get; }
|
||||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace TaskTrackerDataModels.Models
|
namespace TaskTrackerDataModels.Models
|
||||||
{
|
{
|
||||||
internal interface IStudentModel : IId
|
public interface IStudentModel : IId
|
||||||
{
|
{
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
DateTime DateBirth { get; }
|
DateTime DateBirth { get; }
|
||||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace TaskTrackerDataModels.Models
|
namespace TaskTrackerDataModels.Models
|
||||||
{
|
{
|
||||||
internal interface ISubjectModel : IId
|
public interface ISubjectModel : IId
|
||||||
{
|
{
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user