DepartmentProject/DepartmentPortal/Department/DepartmentBusinessLogic/BindingModels/EmployeeBindingModels.cs

63 lines
1.8 KiB
C#

using ModuleTools.Attributes;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels
{
/// <summary>
/// Получение сотрудника
/// </summary>
public class EmployeeGetBindingModel : GetBindingModel
{
}
/// <summary>
/// Сохранение сотрудника
/// </summary>
public class EmployeeSetBindingModel : SetBindingModel
{
[Required(ErrorMessage = "required")]
[MapConfiguration("UserId")]
public Guid UserId { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("FirstName")]
public string FirstName { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("LastName")]
public string LastName { get; set; }
[MapConfiguration("Patronymic")]
public string Patronymic { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("DateBirth")]
public DateTime DateBirth { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("Address")]
public string Address { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("Email")]
public string Email { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("MobileNumber")]
public string MobileNumber { get; set; }
[MapConfiguration("HomeNumber")]
public string HomeNumber { get; set; }
[MapConfiguration("Description")]
public string Description { get; set; }
[MapConfiguration("Photo")]
public byte[] Photo { get; set; }
[MapConfiguration("GroupElectricalSafety")]
public string GroupElectricalSafety { get; set; }
}
}