stage5_models_and_storages_contracts_lena #2
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
@ -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();
|
||||
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -7,11 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="BindingModels\" />
|
||||
<Folder Include="StoragesContracts\" />
|
||||
<Folder Include="SearchModels\" />
|
||||
<Folder Include="ViewModels\" />
|
||||
<Folder Include="BusinessLogicsContracts\" />
|
||||
<ProjectReference Include="..\PolyclinicDataModels\PolyclinicDataModels.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
23
Polyclinic/PolyclinicContracts/ViewModels/MedicamentView.cs
Normal file
23
Polyclinic/PolyclinicContracts/ViewModels/MedicamentView.cs
Normal 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();
|
||||
}
|
||||
}
|
24
Polyclinic/PolyclinicContracts/ViewModels/ProcedureView.cs
Normal file
24
Polyclinic/PolyclinicContracts/ViewModels/ProcedureView.cs
Normal 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();
|
||||
|
||||
}
|
||||
}
|
23
Polyclinic/PolyclinicContracts/ViewModels/RecipeView.cs
Normal file
23
Polyclinic/PolyclinicContracts/ViewModels/RecipeView.cs
Normal 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();
|
||||
}
|
||||
}
|
24
Polyclinic/PolyclinicContracts/ViewModels/SuretorView.cs
Normal file
24
Polyclinic/PolyclinicContracts/ViewModels/SuretorView.cs
Normal 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;
|
||||
|
||||
}
|
||||
}
|
16
Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs
Normal file
16
Polyclinic/PolyclinicDataModels/Models/IMedicamentModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
15
Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs
Normal file
15
Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
16
Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs
Normal file
16
Polyclinic/PolyclinicDataModels/Models/IRecipeModel.cs
Normal 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; }
|
||||
|
||||
}
|
||||
}
|
15
Polyclinic/PolyclinicDataModels/Models/ISuretorModel.cs
Normal file
15
Polyclinic/PolyclinicDataModels/Models/ISuretorModel.cs
Normal 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; }
|
||||
}
|
||||
}
|
@ -6,8 +6,4 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user