поправила везде методы создания и чтобы комментарии могли быть null
This commit is contained in:
parent
4f3243bb1c
commit
7eb6e50cd6
@ -6,7 +6,7 @@ namespace PolyclinicContracts.BindingModels
|
||||
{
|
||||
public int DaysCount { get; set; }
|
||||
public int PillsPerDay { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
public Dictionary<int, IDiagnoseModel> CourseDiagnoses { get; set; } = new();
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
@ -8,6 +8,6 @@ namespace PolyclinicContracts.BindingModels
|
||||
public int? SymptomId { get; set; }
|
||||
public int ProcedureId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@ namespace PolyclinicContracts.BindingModels
|
||||
public int Id { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
public DateTime DateStartProcedure { get; set; } = DateTime.Now;
|
||||
public DateTime? DateStopProcedure { get; set; }
|
||||
|
||||
|
@ -7,7 +7,7 @@ namespace PolyclinicContracts.BindingModels
|
||||
public int Id { get; set; }
|
||||
public int? CourseId { get; set; }
|
||||
public int ProceduresCount { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
public Dictionary<int, IProcedureModel> RecipeProcedures { get; set; } = new();
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ namespace PolyclinicContracts.BindingModels
|
||||
public class SymptomBindingModel : ISymptomModel
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
public Dictionary<int, IDiagnoseModel> SymptomDiagnoses { get; set; } = new();
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ namespace PolyclinicContracts.ViewModels
|
||||
[DisplayName("Препарата в день")]
|
||||
public int PillsPerDay { get; set; }
|
||||
[DisplayName("Комментарий")]
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
public Dictionary<int, IDiagnoseModel> CourseDiagnoses { get; set; } = new();
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace PolyclinicContracts.ViewModels
|
||||
|
||||
|
||||
[DisplayName("Комментарий")]
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
|
||||
|
||||
[DisplayName("Название симптома")]
|
||||
|
@ -12,7 +12,7 @@ namespace PolyclinicContracts.ViewModels
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Комментарий")]
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Дата 'от'")]
|
||||
public DateTime DateStartProcedure { get; set; } = DateTime.Now;
|
||||
|
@ -11,7 +11,7 @@ namespace PolyclinicContracts.ViewModels
|
||||
public int ProceduresCount { get; set; }
|
||||
|
||||
[DisplayName("Комментарий")]
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
|
||||
[DisplayName("Номер курса")]
|
||||
public int? CourseId { get; set; }
|
||||
|
@ -8,7 +8,7 @@ namespace PolyclinicContracts.ViewModels
|
||||
[DisplayName("Название")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[DisplayName("Комментарий")]
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
public Dictionary<int, IDiagnoseModel> SymptomDiagnoses { get; set; } = new();
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
{
|
||||
int DaysCount { get; }
|
||||
int PillsPerDay { get; }
|
||||
string Comment { get; }
|
||||
string? Comment { get; }
|
||||
Dictionary<int, IDiagnoseModel> CourseDiagnoses { get; }
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
public interface IMedicamentModel : IId
|
||||
{
|
||||
string Name { get; }
|
||||
string Comment { get; }
|
||||
string? Comment { get; }
|
||||
int ProcedureId { get; }
|
||||
int? SymptomId { get; }
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
public interface IProcedureModel : IId
|
||||
{
|
||||
string Name { get; }
|
||||
string Comment { get; }
|
||||
string? Comment { get; }
|
||||
int UserId { get; }
|
||||
DateTime DateStartProcedure { get; }
|
||||
DateTime? DateStopProcedure { get; }
|
||||
|
@ -3,7 +3,7 @@
|
||||
public interface IRecipeModel : IId
|
||||
{
|
||||
int ProceduresCount { get; set; }
|
||||
string Comment { get; set; }
|
||||
string? Comment { get; set; }
|
||||
int? CourseId { get; set; }
|
||||
Dictionary<int, IProcedureModel> RecipeProcedures { get; }
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
public interface ISymptomModel : IId
|
||||
{
|
||||
string Name { get; }
|
||||
string Comment { get; }
|
||||
string? Comment { get; }
|
||||
Dictionary<int, IDiagnoseModel> SymptomDiagnoses { get; }
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
public int DaysCount { get; set; }
|
||||
[Required]
|
||||
public int PillsPerDay { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
[ForeignKey("CourseId")]
|
||||
public virtual List<CourseDiagnose> Diagnoses { get; set; } = new();
|
||||
private Dictionary<int, IDiagnoseModel>? _courseDiagnoses = null;
|
||||
@ -34,7 +34,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
}
|
||||
}
|
||||
|
||||
public static Course Create(PolyclinicDatabase context, CourseBindingModel model)
|
||||
public static Course? Create(PolyclinicDatabase context, CourseBindingModel model)
|
||||
{
|
||||
return new Course()
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
[Required]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
public int ProcedureId { get; set; }
|
||||
@ -24,7 +24,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
public virtual Symptom? Symptom { get; set; }
|
||||
public virtual Procedure? Procedure { get; set; }
|
||||
|
||||
public static Medicament Create(MedicamentBindingModel bindingModel)
|
||||
public static Medicament? Create(MedicamentBindingModel bindingModel)
|
||||
{
|
||||
return new Medicament()
|
||||
{
|
||||
|
@ -21,9 +21,9 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
public DateTime? DateStopProcedure { get; set; }
|
||||
public virtual User User { get; set; } = new();
|
||||
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
|
||||
public static Procedure Create(ProcedureBindingModel bindingModel)
|
||||
public static Procedure? Create(ProcedureBindingModel bindingModel)
|
||||
{
|
||||
return new Procedure()
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
[Required]
|
||||
public int ProceduresCount { get; set; }
|
||||
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
public int? CourseId { get; set; }
|
||||
public virtual Course Course { get; set; } = new();
|
||||
|
||||
@ -36,7 +36,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
}
|
||||
}
|
||||
|
||||
public static Recipe Create(PolyclinicDatabase database, RecipeBindingModel bindingModel)
|
||||
public static Recipe? Create(PolyclinicDatabase database, RecipeBindingModel bindingModel)
|
||||
{
|
||||
return new Recipe()
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string? Comment { get; set; } = string.Empty;
|
||||
[ForeignKey("SymptomId")]
|
||||
public virtual List<SymptomDiagnose> Diagnoses { get; set; } = new();
|
||||
private Dictionary<int, IDiagnoseModel>? _symptomDiagnoses = null;
|
||||
@ -32,7 +32,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
}
|
||||
public int Id { get; set; }
|
||||
|
||||
public static Symptom Create(PolyclinicDatabase context, SymptomBindingModel model)
|
||||
public static Symptom? Create(PolyclinicDatabase context, SymptomBindingModel model)
|
||||
{
|
||||
return new Symptom()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user