+ частично контракты

This commit is contained in:
DyCTaTOR 2024-04-18 19:35:33 +04:00
parent ca7aadc6e3
commit f9397fd277
11 changed files with 186 additions and 1 deletions

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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<AttestationViewModel>? ReadList(AttestationSearchModel? model);
AttestationViewModel? ReadElement(AttestationSearchModel model);
bool Create(AttestationBindingModel model);
bool Update(AttestationBindingModel model);
bool Delete(AttestationBindingModel model);
}
}

View File

@ -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<PlanOfStudyViewModel>? ReadList(PlanOfStudySearchModel? model);
PlanOfStudyViewModel? ReadElement(PlanOfStudySearchModel model);
bool Create(PlanOfStudyBindingModel model);
bool Update(PlanOfStudyBindingModel model);
bool Delete(PlanOfStudyBindingModel model);
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -1,4 +1,4 @@
using University.DataModels.Models; using UniversityDataModels.Models;
namespace UniversityContracts.SearchModels namespace UniversityContracts.SearchModels
{ {

View File

@ -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<AttestationViewModel> GetFullList();
List<AttestationViewModel> GetFilteredList(AttestationSearchModel model);
AttestationViewModel? GetElement(AttestationSearchModel model);
AttestationViewModel? Insert(AttestationBindingModel model);
AttestationViewModel? Update(AttestationBindingModel model);
AttestationViewModel? Delete(AttestationBindingModel model);
}
}

View File

@ -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<PlanOfStudyViewModel> GetFullList();
List<PlanOfStudyViewModel> GetFilteredList(PlanOfStudySearchModel model);
PlanOfStudyViewModel? GetElement(PlanOfStudySearchModel model);
PlanOfStudyViewModel? Insert(PlanOfStudyBindingModel model);
PlanOfStudyViewModel? Update(PlanOfStudyBindingModel model);
PlanOfStudyViewModel? Delete(PlanOfStudyBindingModel model);
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}