diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs index 12ea030..24716bb 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/Diagnose.cs @@ -8,13 +8,13 @@ namespace PolyclinicDatabaseImplement.Models public class Diagnose : IDiagnoseModel { [Required] - public string Name { get; private set; } = string.Empty; + public string Name { get; set; } = string.Empty; [Required] - public string Comment { get; private set; } = string.Empty; + public string Comment { get; set; } = string.Empty; [Required] - public int UserId { get; private set; } - public int Id { get; private set; } - public virtual User? User { get; private set; } + public int UserId { get; set; } + public int Id { get; set; } + public virtual User? User { get; set; } public static Diagnose? Create(DiagnoseBindingModel? model) { diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/User.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/User.cs index 67f88e5..4773dc6 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/User.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/User.cs @@ -9,14 +9,14 @@ namespace PolyclinicDatabaseImplement.Models public class User : IUserModel { [Required] - public string FIO { get; private set; } = string.Empty; + public string FIO { get; set; } = string.Empty; [Required] - public string Email { get; private set; } = string.Empty; + public string Email { get; set; } = string.Empty; [Required] - public string Password { get; private set; } = string.Empty; + public string Password { get; set; } = string.Empty; [Required] - public UserRole Role { get; private set; } = UserRole.Неизвестный; - public int Id { get; private set; } + public UserRole Role { get; set; } = UserRole.Неизвестный; + public int Id { get; set; } public static User? Create(UserBindingModel? model) { diff --git a/Polyclinic/PolyclinicDatabaseImplement/PolyclinicDatabase.cs b/Polyclinic/PolyclinicDatabaseImplement/PolyclinicDatabase.cs index 4126fe1..5628550 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/PolyclinicDatabase.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/PolyclinicDatabase.cs @@ -1,4 +1,5 @@ using Microsoft.EntityFrameworkCore; +using PolyclinicDatabaseImplement.Models; namespace SecuritySystemDatabaseImplement { @@ -12,6 +13,9 @@ namespace SecuritySystemDatabaseImplement } base.OnConfiguring(optionsBuilder); } - //public virtual DbSet Components { set; get; } + public virtual DbSet Users { set; get; } + public virtual DbSet Diagnoses { set; get; } + public virtual DbSet Courses { set; get; } + public virtual DbSet CourseDiagnoses { set; get; } } }