Фикс модели пользователя, поле роль
This commit is contained in:
parent
21d08fdfa1
commit
5274fa75b6
@ -14,6 +14,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
[Required]
|
||||
public int UserId { get; private set; }
|
||||
public int Id { get; private set; }
|
||||
|
||||
public static Diagnose? Create(DiagnoseBindingModel? model)
|
||||
{
|
||||
if (model == null)
|
||||
|
@ -17,6 +17,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
[Required]
|
||||
public UserRole Role { get; private set; } = UserRole.Неизвестный;
|
||||
public int Id { get; private set; }
|
||||
|
||||
public static User? Create(UserBindingModel? model)
|
||||
{
|
||||
if (model == null)
|
||||
@ -28,6 +29,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
FIO = model.FIO,
|
||||
Email = model.Email,
|
||||
Password = model.Password,
|
||||
Role = model.Role,
|
||||
Id = model.Id
|
||||
};
|
||||
}
|
||||
@ -41,6 +43,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
FIO = model.FIO;
|
||||
Email = model.Email;
|
||||
Password = model.Password;
|
||||
Role = model.Role;
|
||||
FIO = model.FIO;
|
||||
}
|
||||
|
||||
@ -49,6 +52,7 @@ namespace PolyclinicDatabaseImplement.Models
|
||||
FIO = FIO,
|
||||
Email = Email,
|
||||
Password = Password,
|
||||
Role = Role,
|
||||
Id = Id
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user