Фикс модели пользователя, поле роль

This commit is contained in:
Никита Потапов 2024-04-28 12:55:26 +04:00
parent 21d08fdfa1
commit 5274fa75b6
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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
};
}