вливаю всё, что было создано на 5, 6, 7 этапах в ветку main #12
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PolyclinicDatabaseImplement.Models;
|
||||
|
||||
namespace SecuritySystemDatabaseImplement
|
||||
{
|
||||
@ -12,6 +13,9 @@ namespace SecuritySystemDatabaseImplement
|
||||
}
|
||||
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