2022-03-18 12:47:34 +04:00
|
|
|
|
using CoreModels.ModelsSecurity;
|
2021-03-26 20:09:52 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2022-03-20 10:10:44 +04:00
|
|
|
|
using ToolsModule.ManagmentEntity;
|
2021-03-26 20:09:52 +04:00
|
|
|
|
|
2022-03-19 19:58:10 +04:00
|
|
|
|
namespace SecurityContract.BindingModels
|
2021-03-26 20:09:52 +04:00
|
|
|
|
{
|
2022-03-18 12:57:40 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение пользователя
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class UserGetBindingModel : GetBindingModel
|
2021-03-26 20:09:52 +04:00
|
|
|
|
{
|
2021-04-01 21:30:29 +04:00
|
|
|
|
public string UserNameForSearch { get; set; }
|
2021-08-20 18:28:34 +04:00
|
|
|
|
|
|
|
|
|
public string Login { get; set; }
|
2021-03-26 20:09:52 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сохранение пользователя
|
|
|
|
|
/// </summary>
|
2022-03-18 12:47:34 +04:00
|
|
|
|
public class UserSetBindingModel : SetBindingModel, IUserModel
|
2021-03-26 20:09:52 +04:00
|
|
|
|
{
|
|
|
|
|
[Required(ErrorMessage = "required")]
|
2022-03-18 12:47:34 +04:00
|
|
|
|
public string UserName { get; set; }
|
2021-03-26 20:09:52 +04:00
|
|
|
|
|
|
|
|
|
[Required(ErrorMessage = "required")]
|
2022-03-18 12:47:34 +04:00
|
|
|
|
public string PasswordHash { get; set; }
|
2021-03-26 20:09:52 +04:00
|
|
|
|
|
|
|
|
|
public byte[] Avatar { get; set; }
|
|
|
|
|
|
|
|
|
|
public DateTime? DateLastVisit { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool IsBanned { get; set; }
|
|
|
|
|
|
|
|
|
|
public DateTime? DateBanned { get; set; }
|
|
|
|
|
|
|
|
|
|
public int CountAttempt { get; set; }
|
2022-03-18 12:47:34 +04:00
|
|
|
|
}
|
2021-03-26 20:09:52 +04:00
|
|
|
|
}
|