Начало storage

This commit is contained in:
Alenka 2024-04-27 16:10:51 +04:00
parent 00ed5959f0
commit 7b81211711
14 changed files with 158 additions and 23 deletions

View File

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HospitalDataModels.Models;
namespace HospitalContracts.BindingModels
{
public class DiseaseBildingModel : IDiseaseModel
{
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public int DoctorId { get; set; }
public int Id { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HospitalDataModels.Models;
namespace HospitalContracts.BindingModels
{
public class MedicineBindingModel : IMedicineModel
{
public string Name { get; set; } = string.Empty;
public string CountryOrigin { get; set; } = string.Empty;
public double Price { get; set; }
public int Id { get; set; }
public int PharmacistId { get; set; }
public Dictionary<int, IProcedureModel> MedicineProcedures { get; set; } = new();
public Dictionary<int, IRecipeModel> MedicineRecipes { get; set; } = new();
}
}

View File

@ -8,7 +8,7 @@ using HospitalDataModels.Models;
namespace HospitalContracts.BindingModels
{
public class ProcedureBildingModel : IProcedureModel
public class ProcedureBindingModel : IProcedureModel
{
public string Name { get; set; } = string.Empty;

View File

@ -0,0 +1,20 @@
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.BusinessLogicContracts
{
public interface IDescriptionProcedureLogic
{
List<DescriptionProcedureViewModel>? ReadList(DescriptionProcedureSearchModel? model);
DescriptionProcedureViewModel? ReadElement(DescriptionProcedureSearchModel model);
bool Create(DescriptionProcedureBindingModel model);
bool Update(DescriptionProcedureBindingModel model);
bool Delete(DescriptionProcedureBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
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.BusinessLogicContracts
{
public interface IMedicineLogic
{
List<MedicineViewModel>? ReadList(MedicineSearchModel? model);
MedicineViewModel? ReadElement(MedicineSearchModel model);
bool Create(MedicineBindingModel model);
bool Update(MedicineBindingModel model);
bool Delete(MedicineBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
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.BusinessLogicContracts
{
public interface IProcedureLogic
{
List<ProcedureViewModel>? ReadList(ProcedureSearchModel? model);
ProcedureViewModel? ReadElement(ProcedureSearchModel model);
bool Create(ProcedureBindingModel model);
bool Update(ProcedureBindingModel model);
bool Delete(ProcedureBindingModel model);
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalContracts.SearchModels
{
public class DescriptionProcedureSearchModel
{
public int? Id { get; set; }
public string? Description { get; set; } = string.Empty;
public int? PharmacistId { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalContracts.SearchModels
{
public class MedicineSearchModel
{
public int? Id { get; set; }
public string? Name { get; set; } = string.Empty;
public string? CountryOrigin { get; set; }
public double? Price { get; set; }
public int? PharmacistId { get; set; }
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HospitalContracts.SearchModels
{
public class ProcedureSearchModel
{
public int? Id { get; set; }
public string? Name { get; set; } = string.Empty;
public DateTime? Date { get; set; }
public int? DescriptionOfTheProcedureId { get; set; }
public int? PharmacistId { get; set; }
}
}

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 IMedicineStorage
{
List<MedicineViewModel> GetFullList();
List<MedicineViewModel> GetFilteredList(MedicineSearchModel model);
MedicineViewModel? GetElement(MedicineSearchModel model);
MedicineViewModel? Insert(MedicineBindingModel model);
MedicineViewModel? Update(MedicineBindingModel model);
MedicineViewModel? Delete(MedicineBindingModel model);
}
}

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace HospitalContracts.ViewModels
{
internal class DescriptionProcedureViewModel
public class DescriptionProcedureViewModel
{
}
}

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace HospitalContracts.ViewModels
{
internal class MedicineViewModel
public class MedicineViewModel
{
}
}

View File

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace HospitalContracts.ViewModels
{
internal class ProcedureViewModel
public class ProcedureViewModel
{
}
}

View File

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