Кодеревью, переименована сущность диагноза, убраны лишние using

This commit is contained in:
Никита Потапов 2024-04-28 12:12:39 +04:00
parent 8aaa37df75
commit 2a545be7f8
23 changed files with 54 additions and 79 deletions

View File

@ -8,7 +8,7 @@ namespace PolyclinicContracts.BindingModels
public int PillsPerDay { get; set; }
public string Comment { get; set; } = string.Empty;
public int RecipeId { get; set; }
public Dictionary<int, IDiagnosisModel> CourseDiagnosis { get; set; } = new();
public Dictionary<int, IDiagnoseModel> CourseDiagnoses { get; set; } = new();
public int Id { get; set; }
}
}

View File

@ -2,7 +2,7 @@
namespace PolyclinicContracts.BindingModels
{
public class DiagnosisBindingModel : IDiagnosisModel
public class DiagnoseBindingModel : IDiagnoseModel
{
public string Name { get; set; } = string.Empty;
public string Comment { get; set; } = string.Empty;

View File

@ -9,7 +9,7 @@ namespace PolyclinicContracts.BindingModels
public int ProcedureId { 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();
public Dictionary<int, ISymptomModel> MedicamentSymptomes { get; set; } = new();
public Dictionary<int, IProcedureModel> MedicamentProcedures { get; set; } = new();
}
}

View File

@ -7,7 +7,7 @@ namespace PolyclinicContracts.BindingModels
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();
public Dictionary<int, ICourseModel> ProcedureCourses { get; set; } = new();
}
}

View File

@ -7,7 +7,7 @@ namespace PolyclinicContracts.BindingModels
public int Id { get; set; }
public int ProceduresCount { get; set; }
public string Comment { get; set; } = string.Empty;
public Dictionary<int, IRecipeModel> ProcedureRecipe { get; set; } = new();
public Dictionary<int, IRecipeModel> ProcedureRecipes { get; set; } = new();
}
}

View File

@ -6,7 +6,7 @@ namespace PolyclinicContracts.BindingModels
{
public string Name { get; set; } = string.Empty;
public string Comment { get; set; } = string.Empty;
public Dictionary<int, IDiagnosisModel> SymptomDiagnosis { get; set; } = new();
public Dictionary<int, IDiagnoseModel> SymptomDiagnoses { get; set; } = new();
public Dictionary<int, IRecipeModel> SymptomRecipes { get; set; } = new();
public int Id { get; set; }
}

View File

@ -0,0 +1,15 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
namespace PolyclinicContracts.BusinessLogicsContracts
{
public interface IDiagnoseLogic
{
List<DiagnoseViewModel>? ReadList(DiagnoseSearchModel? model);
DiagnoseViewModel? ReadElement(DiagnoseSearchModel model);
bool Create(DiagnoseBindingModel model);
bool Update(DiagnoseBindingModel model);
bool Delete(DiagnoseBindingModel model);
}
}

View File

@ -1,15 +0,0 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
namespace PolyclinicContracts.BusinessLogicsContracts
{
public interface IDiagnosisLogic
{
List<DiagnosisViewModel>? ReadList(DiagnosisSearchModel? model);
DiagnosisViewModel? ReadElement(DiagnosisSearchModel model);
bool Create(DiagnosisBindingModel model);
bool Update(DiagnosisBindingModel model);
bool Delete(DiagnosisBindingModel model);
}
}

View File

@ -1,6 +1,6 @@
namespace PolyclinicContracts.SearchModels
{
public class DiagnosisSearchModel
public class DiagnoseSearchModel
{
public int? Id { get; set; }
public int? UserId { get; set; }

View File

@ -0,0 +1,16 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
namespace PolyclinicContracts.StoragesContracts
{
public interface IDiagnoseStorage
{
List<DiagnoseViewModel> GetFullList();
List<DiagnoseViewModel> GetFilteredList(DiagnoseSearchModel model);
DiagnoseViewModel? GetElement(DiagnoseSearchModel model);
DiagnoseViewModel? Insert(DiagnoseBindingModel model);
DiagnoseViewModel? Update(DiagnoseBindingModel model);
DiagnoseViewModel? Delete(DiagnoseBindingModel model);
}
}

View File

@ -1,16 +0,0 @@
using PolyclinicContracts.BindingModels;
using PolyclinicContracts.SearchModels;
using PolyclinicContracts.ViewModels;
namespace PolyclinicContracts.StoragesContracts
{
public interface IDiagnosisStorage
{
List<DiagnosisViewModel> GetFullList();
List<DiagnosisViewModel> GetFilteredList(DiagnosisSearchModel model);
DiagnosisViewModel? GetElement(DiagnosisSearchModel model);
DiagnosisViewModel? Insert(DiagnosisBindingModel model);
DiagnosisViewModel? Update(DiagnosisBindingModel model);
DiagnosisViewModel? Delete(DiagnosisBindingModel model);
}
}

View File

@ -12,7 +12,7 @@ namespace PolyclinicContracts.ViewModels
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
public int RecipeId { get; set; }
public Dictionary<int, IDiagnosisModel> CourseDiagnosis { get; set; } = new();
public Dictionary<int, IDiagnoseModel> CourseDiagnoses { get; set; } = new();
public int Id { get; set; }
}
}

View File

@ -3,7 +3,7 @@ using System.ComponentModel;
namespace PolyclinicContracts.ViewModels
{
public class DiagnosisViewModel : IDiagnosisModel
public class DiagnoseViewModel : IDiagnoseModel
{
[DisplayName("Название")]
public string Name { get; set; } = string.Empty;

View File

@ -8,10 +8,8 @@ namespace PolyclinicContracts.ViewModels
public int Id { get; set; }
public int ProcedureId { get; set; }
public int SymptomId { get; set; }
[DisplayName("Название медикамента")]
public string Name { get; set; } = string.Empty;
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
}

View File

@ -6,14 +6,11 @@ namespace PolyclinicContracts.ViewModels
public class ProcedureViewModel : IProcedureModel
{
public int Id { get; set; }
[DisplayName("Название процедуры")]
public string Name { get; set; }
public string Name { get; set; } = string.Empty;
[DisplayName("Комментарий")]
public string Comment { get; set; }
public Dictionary<int, ICourseModel> ProcedureCourse { get; set; } = new();
public string Comment { get; set; } = string.Empty;
public Dictionary<int, ICourseModel> ProcedureCourses { get; set; } = new();
}
}

View File

@ -6,12 +6,10 @@ namespace PolyclinicContracts.ViewModels
public class RecipeViewModel : IRecipeModel
{
public int Id { get; set; }
[DisplayName("Количество процедур")]
public int ProceduresCount { get; set; }
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
public Dictionary<int, IRecipeModel> ProcedureRecipe { get; set; } = new();
public Dictionary<int, IRecipeModel> ProcedureRecipes { get; set; } = new();
}
}

View File

@ -9,7 +9,7 @@ namespace PolyclinicContracts.ViewModels
public string Name { get; set; } = string.Empty;
[DisplayName("Комментарий")]
public string Comment { get; set; } = string.Empty;
public Dictionary<int, IDiagnosisModel> SymptomDiagnosis { get; set; } = new();
public Dictionary<int, IDiagnoseModel> SymptomDiagnoses { get; set; } = new();
public Dictionary<int, IRecipeModel> SymptomRecipes { get; set; } = new();
public int Id { get; set; }
}

View File

@ -6,6 +6,6 @@
int PillsPerDay { get; }
string Comment { get; }
int RecipeId { get; }
Dictionary<int, IDiagnosisModel> CourseDiagnosis { get; }
Dictionary<int, IDiagnoseModel> CourseDiagnoses { get; }
}
}

View File

@ -1,6 +1,6 @@
namespace PolyclinicDataModels.Models
{
public interface IDiagnosisModel : IId
public interface IDiagnoseModel : IId
{
string Name { get; }
string Comment { get; }

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyclinicDataModels.Models
namespace PolyclinicDataModels.Models
{
public interface IMedicamentModel : IId
{

View File

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

View File

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

View File

@ -4,7 +4,7 @@
{
string Name { get; }
string Comment { get; }
Dictionary<int, IDiagnosisModel> SymptomDiagnosis { get; }
Dictionary<int, IDiagnoseModel> SymptomDiagnoses { get; }
Dictionary<int, IRecipeModel> SymptomRecipes { get; }
}
}