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

51 lines
1.2 KiB
C#
Raw Normal View History

using ModuleTools.Attributes;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace SecurityBusinessLogic.BindingModels
{
/// <summary>
/// Получение пользователя
/// </summary>
public class UserGetBindingModel : GetBindingModel
{
}
/// <summary>
/// Сохранение пользователя
/// </summary>
public class UserSetBindingModel : SetBindingModel
{
[Required(ErrorMessage = "required")]
[MapConfiguration("Login")]
public string Login { get; set; }
[Required(ErrorMessage = "required")]
public string Password { get; set; }
[MapConfiguration("StudentId")]
public Guid? StudentId { get; set; }
[MapConfiguration("LecturerId")]
public Guid? LecturerId { get; set; }
[MapConfiguration("EmployeeId")]
public Guid? EmployeeId { get; set; }
[MapConfiguration("Avatar")]
public byte[] Avatar { get; set; }
[MapConfiguration("DateLastVisit")]
public DateTime? DateLastVisit { get; set; }
[MapConfiguration("IsBanned")]
public bool IsBanned { get; set; }
[MapConfiguration("DateBanned")]
public DateTime? DateBanned { get; set; }
[MapConfiguration("CountAttempt")]
public int CountAttempt { get; set; }
}
}