Сделанные сущности + начало добавления контрактов
This commit is contained in:
parent
f29376d4d8
commit
21a359f78d
14
University/Contracts/BindingModel/StudentBindingModel.cs
Normal file
14
University/Contracts/BindingModel/StudentBindingModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using University.DataModels.Models;
|
||||||
|
|
||||||
|
namespace University.Contracts.BindingModel
|
||||||
|
{
|
||||||
|
public class StudentBindingModel : IStudentModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
public string Familia { get; set; } = string.Empty;
|
||||||
|
public string? Patronomyc { get; set; }
|
||||||
|
public string PhoneNumber { get; set; } = string.Empty;
|
||||||
|
public IPlanOfStudyModel? planOfStudy { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using University.Contracts.BindingModel;
|
||||||
|
using University.Contracts.SearchModels;
|
||||||
|
using University.Contracts.ViewModels;
|
||||||
|
|
||||||
|
namespace University.Contracts.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);
|
||||||
|
}
|
||||||
|
}
|
13
University/Contracts/SearchModels/StudentSearchModel.cs
Normal file
13
University/Contracts/SearchModels/StudentSearchModel.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using University.DataModels.Models;
|
||||||
|
|
||||||
|
namespace University.Contracts.SearchModels
|
||||||
|
{
|
||||||
|
public class StudentSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
public string? Familia { get; set; }
|
||||||
|
public IPlanOfStudyModel? planOfStudy { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
16
University/Contracts/StorageContracts/IStudentStorage.cs
Normal file
16
University/Contracts/StorageContracts/IStudentStorage.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using University.Contracts.BindingModel;
|
||||||
|
using University.Contracts.SearchModels;
|
||||||
|
using University.Contracts.ViewModels;
|
||||||
|
|
||||||
|
namespace University.Contracts.StorageContracts
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
20
University/Contracts/ViewModels/StudentViewModel.cs
Normal file
20
University/Contracts/ViewModels/StudentViewModel.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using University.DataModels.Models;
|
||||||
|
|
||||||
|
namespace University.Contracts.ViewModels
|
||||||
|
{
|
||||||
|
public class StudentViewModel : IStudentModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
[DisplayName("Имя")]
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Фамилия")]
|
||||||
|
public string Familia { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Отчество")]
|
||||||
|
public string Patronomyc { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Номер Телефона")]
|
||||||
|
public string PhoneNumber { get; set; } = string.Empty;
|
||||||
|
public IPlanOfStudyModel planOfStudy { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
9
University/DataModels/Models/IAttestationModel.cs
Normal file
9
University/DataModels/Models/IAttestationModel.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace University.DataModels.Models
|
||||||
|
{
|
||||||
|
public interface IAttestationModel : IId
|
||||||
|
{
|
||||||
|
string FormOfEvaluation { get; }
|
||||||
|
string Score { get; }
|
||||||
|
IStudentModel Student { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
namespace University.DataModels.Models
|
namespace University.DataModels.Models
|
||||||
{
|
{
|
||||||
public interface IDiscipline : IId
|
public interface IDisciplineModel : IId
|
||||||
{
|
{
|
||||||
int TeacherId { get; }
|
int TeacherId { get; }
|
||||||
string Name { get; set; }
|
string Name { get; set; }
|
9
University/DataModels/Models/IPlanOfStudyModel.cs
Normal file
9
University/DataModels/Models/IPlanOfStudyModel.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace University.DataModels.Models
|
||||||
|
{
|
||||||
|
public interface IPlanOfStudyModel : IId
|
||||||
|
{
|
||||||
|
string Profile { get; }
|
||||||
|
string FormOfStudy { get; }
|
||||||
|
Dictionary<int, IWorkerModel> Workers { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
namespace University.DataModels.Models
|
namespace University.DataModels.Models
|
||||||
{
|
{
|
||||||
public interface IStatement : IId
|
public interface IStatementModel : IId
|
||||||
{
|
{
|
||||||
int TeacherId { get; }
|
int TeacherId { get; }
|
||||||
string Name { get; }
|
string Name { get; }
|
@ -1,6 +1,6 @@
|
|||||||
namespace University.DataModels.Models
|
namespace University.DataModels.Models
|
||||||
{
|
{
|
||||||
public interface IStorekeeper : IPerson
|
public interface IStorekeeperModel : IPerson
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +0,0 @@
|
|||||||
namespace University.DataModels.Models
|
|
||||||
{
|
|
||||||
public interface IStudent : IId
|
|
||||||
{
|
|
||||||
string Name { get; }
|
|
||||||
public string PhoneNumber { get; }
|
|
||||||
Dictionary<int, (IDiscipline, int)> StudentDisciplines { get; }
|
|
||||||
}
|
|
||||||
}
|
|
11
University/DataModels/Models/IStudentModel.cs
Normal file
11
University/DataModels/Models/IStudentModel.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
namespace University.DataModels.Models
|
||||||
|
{
|
||||||
|
public interface IStudentModel : IId
|
||||||
|
{
|
||||||
|
string Name { get; }
|
||||||
|
string Familia { get; }
|
||||||
|
string Patronomyc { get; }
|
||||||
|
public string PhoneNumber { get; }
|
||||||
|
IPlanOfStudyModel planOfStudy { get; }
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
namespace University.DataModels.Models
|
namespace University.DataModels.Models
|
||||||
{
|
{
|
||||||
public interface ITeacher : IId
|
public interface ITeacherModel : IId
|
||||||
{
|
{
|
||||||
int StorekeeperId { get; }
|
int StorekeeperId { get; }
|
||||||
string Name { get; }
|
string Name { get; }
|
6
University/DataModels/Models/IWorkerModel.cs
Normal file
6
University/DataModels/Models/IWorkerModel.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace University.DataModels.Models
|
||||||
|
{
|
||||||
|
public interface IWorkerModel : IPerson
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user