Merge branch 'stage5_models_and_storages_contracts' into stage5_models_and_storages_contracts_nikita

This commit is contained in:
ekallin 2024-04-27 10:39:51 +04:00
commit e84efd94f6
24 changed files with 448 additions and 0 deletions

View File

@ -0,0 +1,18 @@
using PolyclinicDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BindingModels
{
public class MedicamentBindingModel : IMedicamentModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Comment { get; set; } = string.Empty;
public Dictionary<int, ISymptomModel> MedicamentSymptom { get; set; } = new();
public Dictionary<int, IProcedureModel> MedicamentProcedure { get; set; } = new();
}
}

View File

@ -0,0 +1,18 @@
using PolyclinicDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BindingModels
{
public class ProcedureBindingModel : IProcedureModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Comment { get; set; } = string.Empty;
public Dictionary<int, ICourseModel> ProcedureCourse { get; set; } = new();
}
}

View File

@ -0,0 +1,18 @@
using PolyclinicDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BindingModels
{
public class RecipeBindingModel : IRecipeModel
{
public int Id { get; set; }
public int CountProcedures { get; set; }
public string Comment { get; set; } = string.Empty;
public Dictionary<int, IRecipeModel> ProcedureRecipe { get; set; } = new();
}
}

View File

@ -0,0 +1,17 @@
using PolyclinicDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BindingModels
{
public class SuretorBindingModel : ISuretorModel
{
public int Id { get; set; }
public string FIO { get; set; } = string.Empty;
public string Password { get; set; } = "123";
public string Email { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,20 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BusinessLogicsContracts
{
public interface IMedicamentLogic
{
List<MedicamentView>? ReadList(MedicamentSearchModel? model);
MedicamentView? ReadElement(MedicamentSearchModel model);
bool Create(MedicamentBindingModel model);
bool Update(MedicamentBindingModel model);
bool Delete(MedicamentBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BusinessLogicsContracts
{
public interface IProcedureLogic
{
List<ProcedureView>? ReadList(ProcedureSearchModel? model);
ProcedureView? ReadElement(ProcedureSearchModel model);
bool Create(ProcedureBindingModel model);
bool Update(ProcedureBindingModel model);
bool Delete(ProcedureBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BusinessLogicsContracts
{
public interface IRecipeLogic
{
List<RecipeView>? ReadList(RecipeSearchModel? model);
RecipeView? ReadElement(RecipeSearchModel model);
bool Create(RecipeBindingModel model);
bool Update(RecipeBindingModel model);
bool Delete(RecipeBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.BusinessLogicsContracts
{
public interface ISuretorLogic
{
List<SuretorView>? ReadList(SuretorSearchModel? model);
SuretorView? ReadElement(SuretorSearchModel model);
bool Create(SuretorBindingModel model);
bool Update(SuretorBindingModel model);
bool Delete(SuretorBindingModel model);
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.SearchModels
{
public class MedicamentSearchModel
{
public int? Id { get; set; }
public string? Name { 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 PolyclinicContracts.SearchModels
{
public class ProcedureSearchModel
{
public int? Id { get; set; }
public string? Name { 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 PolyclinicContracts.SearchModels
{
public class RecipeSearchModel
{
public int? Id { get; set; }
public int? CountProcedures { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.SearchModels
{
public class SuretorSearchModel
{
public int? Id { get; set; }
public string? FIO { get; set; }
public DateTime? BirthDay { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.StoragesContracts
{
public interface IMedicamentStorage
{
List<MedicamentView> GetFullList();
List<MedicamentView> GetFilteredList(MedicamentSearchModel model);
MedicamentView? GetElement(MedicamentSearchModel model);
MedicamentView? Insert(MedicamentBindingModel model);
MedicamentView? Update(MedicamentBindingModel model);
MedicamentView? Delete(MedicamentBindingModel model);
}
}

View File

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

View File

@ -0,0 +1,21 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.StoragesContracts
{
public interface IRecipeStorage
{
List<RecipeView> GetFullList();
List<RecipeView> GetFilteredList(RecipeSearchModel model);
RecipeView? GetElement(RecipeSearchModel model);
RecipeView? Insert(RecipeBindingModel model);
RecipeView? Update(RecipeBindingModel model);
RecipeView? Delete(RecipeBindingModel model);
}
}

View File

@ -0,0 +1,21 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.StoragesContracts
{
public interface ISuretorStorage
{
List<SuretorView> GetFullList();
List<SuretorView> GetFilteredList(SuretorSearchModel model);
SuretorView? GetElement(SuretorSearchModel model);
SuretorView? Insert(SuretorBindingModel model);
SuretorView? Update(SuretorBindingModel model);
SuretorView? Delete(SuretorBindingModel model);
}
}

View File

@ -0,0 +1,23 @@
using PolyclinicDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.ViewModels
{
public class MedicamentView : IMedicamentModel
{
public int Id { get; set; }
[DisplayName("Название медикамента")]
public string Name { get; set; } = string.Empty;
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
public Dictionary<int, ISymptomModel> MedicamentSymptom { get; set; } = new();
public Dictionary<int, IProcedureModel> MedicamentProcedure { get; set; } = new();
}
}

View File

@ -0,0 +1,24 @@
using PolyclinicDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.ViewModels
{
public class ProcedureView : IProcedureModel
{
public int Id { get; set; }
[DisplayName("Название процедуры")]
public string Name { get; set; }
[DisplayName("Комментарий")]
public string Comment { get; set; }
public Dictionary<int, ICourseModel> ProcedureCourse { get; set; } = new();
}
}

View File

@ -0,0 +1,23 @@
using PolyclinicDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.ViewModels
{
public class RecipeView : IRecipeModel
{
public int Id { get; set; }
[DisplayName("Количество процедур")]
public int CountProcedures { get; set; }
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
public Dictionary<int, IRecipeModel> ProcedureRecipe { get; set; } = new();
}
}

View File

@ -0,0 +1,24 @@
using PolyclinicDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicContracts.ViewModels
{
public class SuretorView : ISuretorModel
{
public int Id { get; set; }
[DisplayName("ФИО поручителя")]
public string FIO { get; set; } = string.Empty;
public string Password { get; set; } = "123";
[DisplayName("Почта")]
public string Email { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicDataModels.Models
{
public interface IMedicamentModel : IId
{
string Name { get; }
string Comment { get; }
Dictionary<int, ISymptomModel> MedicamentSymptom { get; }
Dictionary<int, IProcedureModel> MedicamentProcedure { get; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicDataModels.Models
{
public interface IProcedureModel : IId
{
string Name { get; }
string Comment { get; }
Dictionary<int, ICourseModel> ProcedureCourse { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicDataModels.Models
{
public interface IRecipeModel : IId
{
int CountProcedures { get; set; }
string Comment { get; set; }
Dictionary<int, IRecipeModel> ProcedureRecipe { get; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicDataModels.Models
{
public interface ISuretorModel : IId
{
string FIO { get; }
string Password { get; }
string Email { get; }
}
}