Кажется слой контрактов done

This commit is contained in:
Alenka 2024-04-27 16:37:42 +04:00
parent 7b81211711
commit 8745ef65a8
8 changed files with 117 additions and 7 deletions

View File

@ -0,0 +1,21 @@
using HospitalContracts.BindingModels;
using HospitalContracts.SearchModels;
using HospitalContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalContracts.StoragesContracts
{
public interface IDescriptionProcedureStorege
{
List<DescriptionProcedureViewModel> GetFullList();
List<DescriptionProcedureViewModel> GetFilteredList(DescriptionProcedureSearchModel model);
DescriptionProcedureViewModel? GetElement(DescriptionProcedureSearchModel model);
DescriptionProcedureViewModel? Insert(DescriptionProcedureBindingModel model);
DescriptionProcedureViewModel? Update(DescriptionProcedureBindingModel model);
DescriptionProcedureViewModel? Delete(DescriptionProcedureBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using HospitalContracts.BindingModels;
using HospitalContracts.SearchModels;
using HospitalContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalContracts.StoragesContracts
{
public interface IPharmacistStorage
{
List<PharmacistViewModel> GetFullList();
List<PharmacistViewModel> GetFilteredList(PharmacistSearchModel model);
PharmacistViewModel? GetElement(PharmacistSearchModel model);
PharmacistViewModel? Insert(PharmacistBindingModel model);
PharmacistViewModel? Update(PharmacistBindingModel model);
PharmacistViewModel? Delete(PharmacistBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HospitalContracts.BindingModels;
using HospitalContracts.SearchModels;
using HospitalContracts.ViewModels;
namespace HospitalContracts.StoragesContracts
{
public interface IProcedureStorage
{
List<ProcedureViewModel> GetFullList();
List<ProcedureViewModel> GetFilteredList(ProcedureSearchModel model);
ProcedureViewModel? GetElement(ProcedureSearchModel model);
ProcedureViewModel? Insert(ProcedureBindingModel model);
ProcedureViewModel? Update(ProcedureBindingModel model);
ProcedureViewModel? Delete(ProcedureBindingModel model);
}
}

View File

@ -1,12 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HospitalDataModels.Models;
namespace HospitalContracts.ViewModels
{
public class DescriptionProcedureViewModel
public class DescriptionProcedureViewModel : IDescriptionProcedureModel
{
public int Id { get; set; }
[DisplayName("Описание процедупы")]
public string Description { get; set; } = string.Empty;
[DisplayName("Фармацевт")]
public int PharmacistId { get; set; }
}
}

View File

@ -1,12 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HospitalDataModels.Models;
namespace HospitalContracts.ViewModels
{
public class MedicineViewModel
public class MedicineViewModel : IMedicineModel
{
public int Id { get; set; }
[DisplayName("Название лекарства")]
public string Name { get; set; } = string.Empty;
[DisplayName("Цена лекарства")]
public double Price { get; set; }
[DisplayName("Страна производителя")]
public string CountryOrigin { get; set; } = string.Empty;
[DisplayName("Фармацевт")]
public int PharmacistId { get; set; }
public Dictionary<int, IProcedureModel> MedicineProcedures { get; set; } = new();
public Dictionary<int, IRecipeModel> MedicineRecipes { get; set; } = new();
}
}

View File

@ -1,12 +1,23 @@
using System;
using HospitalDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalContracts.ViewModels
{
public class PharmacistViewModel
public class PharmacistViewModel : IPharmacistModel
{
public int Id { get; set; }
[DisplayName("ФИО кладовщика")]
public string FIO { get; set; } = string.Empty;
[DisplayName("Логин")]
public string Login { get; set; } = string.Empty;
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
[DisplayName("Номер телефона")]
public string PhoneNumber { get; set; } = string.Empty;
}
}

View File

@ -1,12 +1,26 @@
using System;
using HospitalDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalContracts.ViewModels
{
public class ProcedureViewModel
public class ProcedureViewModel : IProcedureModel
{
public int Id { get; set; }
[DisplayName("Название услуги")]
public string Name { get; set; } = string.Empty;
[DisplayName("Дата процедуры")]
public DateTime Date { get; set; }
[DisplayName("Фармацевт")]
//public string PharmacistFIO { get; set; } = string.Empty;
public int PharmacistId { get; set; }
[DisplayName("Описание процедуры")]
public int DescriptionOfTheProcedureId { get; set; }
public Dictionary<int, IMedicineModel> MedicineProcedures { get; set; } = new();
public Dictionary<int, IPatientModel> PatientProcedures { get; set; } = new();
}
}

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace HospitalDataModels.Models
{
internal interface IDescriptionProcedureModel
public interface IDescriptionProcedureModel
{
string Description { get; }
int PharmacistId { get; }