DepartmentProject/DepartmentPortal/Security/SecurityContract/BindingModels/UserBindingModels.cs

39 lines
939 B
C#

using CoreModels.ModelsSecurity;
using System;
using System.ComponentModel.DataAnnotations;
using ToolsModule.ManagmentEntity;
namespace SecurityContract.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; }
}
}