diff --git a/Polyclinic/PolyclinicContracts/BindingModels/MedicamentBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/MedicamentBindingModel.cs new file mode 100644 index 0000000..20af809 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BindingModels/MedicamentBindingModel.cs @@ -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 MedicamentSymptom { get; set; } = new(); + public Dictionary MedicamentProcedure { get; set; } = new(); + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs new file mode 100644 index 0000000..c023140 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs @@ -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 ProcedureCourse { get; set; } = new(); + + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/BindingModels/RecipeBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/RecipeBindingModel.cs new file mode 100644 index 0000000..30560d2 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BindingModels/RecipeBindingModel.cs @@ -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 ProcedureRecipe { get; set; } = new(); + + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/BindingModels/SuretorBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/SuretorBindingModel.cs new file mode 100644 index 0000000..ed9243c --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BindingModels/SuretorBindingModel.cs @@ -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; + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IMedicamentLogic.cs b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IMedicamentLogic.cs new file mode 100644 index 0000000..60597f5 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IMedicamentLogic.cs @@ -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? ReadList(MedicamentSearchModel? model); + MedicamentView? ReadElement(MedicamentSearchModel model); + bool Create(MedicamentBindingModel model); + bool Update(MedicamentBindingModel model); + bool Delete(MedicamentBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IProcedureLogic.cs b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IProcedureLogic.cs new file mode 100644 index 0000000..693ed79 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IProcedureLogic.cs @@ -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? ReadList(ProcedureSearchModel? model); + ProcedureView? ReadElement(ProcedureSearchModel model); + bool Create(ProcedureBindingModel model); + bool Update(ProcedureBindingModel model); + bool Delete(ProcedureBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IRecipeLogic.cs b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IRecipeLogic.cs new file mode 100644 index 0000000..a417ab5 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/IRecipeLogic.cs @@ -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? ReadList(RecipeSearchModel? model); + RecipeView? ReadElement(RecipeSearchModel model); + bool Create(RecipeBindingModel model); + bool Update(RecipeBindingModel model); + bool Delete(RecipeBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/ISuretorLogic.cs b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/ISuretorLogic.cs new file mode 100644 index 0000000..50047f0 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/BusinessLogicsContracts/ISuretorLogic.cs @@ -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? ReadList(SuretorSearchModel? model); + SuretorView? ReadElement(SuretorSearchModel model); + bool Create(SuretorBindingModel model); + bool Update(SuretorBindingModel model); + bool Delete(SuretorBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/PolyclinicContracts.csproj b/Polyclinic/PolyclinicContracts/PolyclinicContracts.csproj index d7f6b16..5a9101d 100644 --- a/Polyclinic/PolyclinicContracts/PolyclinicContracts.csproj +++ b/Polyclinic/PolyclinicContracts/PolyclinicContracts.csproj @@ -7,11 +7,7 @@ - - - - - + diff --git a/Polyclinic/PolyclinicContracts/SearchModels/MedicamentSearchModel.cs b/Polyclinic/PolyclinicContracts/SearchModels/MedicamentSearchModel.cs new file mode 100644 index 0000000..0f159c0 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/SearchModels/MedicamentSearchModel.cs @@ -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; } + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/SearchModels/ProcedureSearchModel.cs b/Polyclinic/PolyclinicContracts/SearchModels/ProcedureSearchModel.cs new file mode 100644 index 0000000..066d5d6 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/SearchModels/ProcedureSearchModel.cs @@ -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; } + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/SearchModels/RecipeSearchModel.cs b/Polyclinic/PolyclinicContracts/SearchModels/RecipeSearchModel.cs new file mode 100644 index 0000000..5751da4 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/SearchModels/RecipeSearchModel.cs @@ -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; } + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/SearchModels/SuretorSearchModel.cs b/Polyclinic/PolyclinicContracts/SearchModels/SuretorSearchModel.cs new file mode 100644 index 0000000..7180507 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/SearchModels/SuretorSearchModel.cs @@ -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; } + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/StoragesContracts/IMedicamentStorage.cs b/Polyclinic/PolyclinicContracts/StoragesContracts/IMedicamentStorage.cs new file mode 100644 index 0000000..aa82958 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/StoragesContracts/IMedicamentStorage.cs @@ -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 GetFullList(); + List GetFilteredList(MedicamentSearchModel model); + MedicamentView? GetElement(MedicamentSearchModel model); + MedicamentView? Insert(MedicamentBindingModel model); + MedicamentView? Update(MedicamentBindingModel model); + MedicamentView? Delete(MedicamentBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/StoragesContracts/IProcedureStorage.cs b/Polyclinic/PolyclinicContracts/StoragesContracts/IProcedureStorage.cs new file mode 100644 index 0000000..ed51fac --- /dev/null +++ b/Polyclinic/PolyclinicContracts/StoragesContracts/IProcedureStorage.cs @@ -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 GetFullList(); + List GetFilteredList(ProcedureSearchModel model); + ProcedureView? GetElement(ProcedureSearchModel model); + ProcedureView? Insert(ProcedureBindingModel model); + ProcedureView? Update(ProcedureBindingModel model); + ProcedureView? Delete(ProcedureBindingModel model); + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/StoragesContracts/IRecipeStorage.cs b/Polyclinic/PolyclinicContracts/StoragesContracts/IRecipeStorage.cs new file mode 100644 index 0000000..e92b394 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/StoragesContracts/IRecipeStorage.cs @@ -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 GetFullList(); + List GetFilteredList(RecipeSearchModel model); + RecipeView? GetElement(RecipeSearchModel model); + RecipeView? Insert(RecipeBindingModel model); + RecipeView? Update(RecipeBindingModel model); + RecipeView? Delete(RecipeBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/StoragesContracts/ISuretorStorage.cs b/Polyclinic/PolyclinicContracts/StoragesContracts/ISuretorStorage.cs new file mode 100644 index 0000000..c7ed61c --- /dev/null +++ b/Polyclinic/PolyclinicContracts/StoragesContracts/ISuretorStorage.cs @@ -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 GetFullList(); + List GetFilteredList(SuretorSearchModel model); + SuretorView? GetElement(SuretorSearchModel model); + SuretorView? Insert(SuretorBindingModel model); + SuretorView? Update(SuretorBindingModel model); + SuretorView? Delete(SuretorBindingModel model); + } +} diff --git a/Polyclinic/PolyclinicContracts/ViewModels/MedicamentView.cs b/Polyclinic/PolyclinicContracts/ViewModels/MedicamentView.cs new file mode 100644 index 0000000..345e93d --- /dev/null +++ b/Polyclinic/PolyclinicContracts/ViewModels/MedicamentView.cs @@ -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 MedicamentSymptom { get; set; } = new(); + public Dictionary MedicamentProcedure { get; set; } = new(); + } +} diff --git a/Polyclinic/PolyclinicContracts/ViewModels/ProcedureView.cs b/Polyclinic/PolyclinicContracts/ViewModels/ProcedureView.cs new file mode 100644 index 0000000..e7212c2 --- /dev/null +++ b/Polyclinic/PolyclinicContracts/ViewModels/ProcedureView.cs @@ -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 ProcedureCourse { get; set; } = new(); + + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/ViewModels/RecipeView.cs b/Polyclinic/PolyclinicContracts/ViewModels/RecipeView.cs new file mode 100644 index 0000000..083f25e --- /dev/null +++ b/Polyclinic/PolyclinicContracts/ViewModels/RecipeView.cs @@ -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 ProcedureRecipe { get; set; } = new(); + } +} diff --git a/Polyclinic/PolyclinicContracts/ViewModels/SuretorView.cs b/Polyclinic/PolyclinicContracts/ViewModels/SuretorView.cs new file mode 100644 index 0000000..84bfa4d --- /dev/null +++ b/Polyclinic/PolyclinicContracts/ViewModels/SuretorView.cs @@ -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; + + } +} diff --git a/Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs b/Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs new file mode 100644 index 0000000..d5fdfef --- /dev/null +++ b/Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs @@ -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 MedicamentSymptom { get; } + Dictionary MedicamentProcedure { get; } + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs b/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs new file mode 100644 index 0000000..2a3345d --- /dev/null +++ b/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs @@ -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 ProcedureCourse { get; } + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs b/Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs new file mode 100644 index 0000000..072945a --- /dev/null +++ b/Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs @@ -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 ProcedureRecipe { get; } + + } +} \ No newline at end of file diff --git a/Polyclinic/PolyclinicDataModels/Models/ISuretorModel.cs b/Polyclinic/PolyclinicDataModels/Models/ISuretorModel.cs new file mode 100644 index 0000000..e88c68f --- /dev/null +++ b/Polyclinic/PolyclinicDataModels/Models/ISuretorModel.cs @@ -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; } + } +} diff --git a/Polyclinic/PolyclinicDataModels/PolyclinicDataModels.csproj b/Polyclinic/PolyclinicDataModels/PolyclinicDataModels.csproj index 962b8f6..27ac386 100644 --- a/Polyclinic/PolyclinicDataModels/PolyclinicDataModels.csproj +++ b/Polyclinic/PolyclinicDataModels/PolyclinicDataModels.csproj @@ -6,8 +6,4 @@ enable - - - -