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