From 289fd1c593fa5c2a82bd22231c68a3a0a247da82 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Sun, 28 Apr 2024 16:09:47 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=BC=D0=BE=D0=B4=D0=B8=D1=84=D0=B8=D0=BA=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D1=8B=20=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF=D0=B0?= =?UTF-8?q?=20=D0=BA=20=D0=BF=D0=BE=D0=BB=D1=8F=D0=BC=20=D0=BC=D0=BE=D0=B6?= =?UTF-8?q?=D0=B5=D0=BB=D0=B5=D0=B9=20=D0=B1=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PolyclinicDatabaseImplement/Models/Diagnose.cs | 10 +++++----- Polyclinic/PolyclinicDatabaseImplement/Models/User.cs | 10 +++++----- .../PolyclinicDatabaseImplement/PolyclinicDatabase.cs | 6 +++++- 3 files changed, 15 insertions(+), 11 deletions(-) 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; } } }