Изменены модификаторы доступа к полям можелей бд
This commit is contained in:
parent
d34842b466
commit
289fd1c593
@ -8,13 +8,13 @@ namespace PolyclinicDatabaseImplement.Models
|
|||||||
public class Diagnose : IDiagnoseModel
|
public class Diagnose : IDiagnoseModel
|
||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; private set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
[Required]
|
[Required]
|
||||||
public string Comment { get; private set; } = string.Empty;
|
public string Comment { get; set; } = string.Empty;
|
||||||
[Required]
|
[Required]
|
||||||
public int UserId { get; private set; }
|
public int UserId { get; set; }
|
||||||
public int Id { get; private set; }
|
public int Id { get; set; }
|
||||||
public virtual User? User { get; private set; }
|
public virtual User? User { get; set; }
|
||||||
|
|
||||||
public static Diagnose? Create(DiagnoseBindingModel? model)
|
public static Diagnose? Create(DiagnoseBindingModel? model)
|
||||||
{
|
{
|
||||||
|
@ -9,14 +9,14 @@ namespace PolyclinicDatabaseImplement.Models
|
|||||||
public class User : IUserModel
|
public class User : IUserModel
|
||||||
{
|
{
|
||||||
[Required]
|
[Required]
|
||||||
public string FIO { get; private set; } = string.Empty;
|
public string FIO { get; set; } = string.Empty;
|
||||||
[Required]
|
[Required]
|
||||||
public string Email { get; private set; } = string.Empty;
|
public string Email { get; set; } = string.Empty;
|
||||||
[Required]
|
[Required]
|
||||||
public string Password { get; private set; } = string.Empty;
|
public string Password { get; set; } = string.Empty;
|
||||||
[Required]
|
[Required]
|
||||||
public UserRole Role { get; private set; } = UserRole.Неизвестный;
|
public UserRole Role { get; set; } = UserRole.Неизвестный;
|
||||||
public int Id { get; private set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public static User? Create(UserBindingModel? model)
|
public static User? Create(UserBindingModel? model)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using PolyclinicDatabaseImplement.Models;
|
||||||
|
|
||||||
namespace SecuritySystemDatabaseImplement
|
namespace SecuritySystemDatabaseImplement
|
||||||
{
|
{
|
||||||
@ -12,6 +13,9 @@ namespace SecuritySystemDatabaseImplement
|
|||||||
}
|
}
|
||||||
base.OnConfiguring(optionsBuilder);
|
base.OnConfiguring(optionsBuilder);
|
||||||
}
|
}
|
||||||
//public virtual DbSet<Component> Components { set; get; }
|
public virtual DbSet<User> Users { set; get; }
|
||||||
|
public virtual DbSet<Diagnose> Diagnoses { set; get; }
|
||||||
|
public virtual DbSet<Course> Courses { set; get; }
|
||||||
|
public virtual DbSet<CourseDiagnose> CourseDiagnoses { set; get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user