39 lines
942 B
C#
39 lines
942 B
C#
using CoreModels.ModelsSecurity;
|
|
using ToolsModule.BindingModels;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace SecurityBusinessLogic.BindingModels
|
|
{
|
|
/// <summary>
|
|
/// Получение пользователя
|
|
/// </summary>
|
|
public class UserGetBindingModel : GetBindingModel
|
|
{
|
|
public string UserNameForSearch { get; set; }
|
|
|
|
public string Login { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Сохранение пользователя
|
|
/// </summary>
|
|
public class UserSetBindingModel : SetBindingModel, IUserModel
|
|
{
|
|
[Required(ErrorMessage = "required")]
|
|
public string UserName { get; set; }
|
|
|
|
[Required(ErrorMessage = "required")]
|
|
public string PasswordHash { get; set; }
|
|
|
|
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; }
|
|
}
|
|
} |