65 lines
1.9 KiB
C#
65 lines
1.9 KiB
C#
using ModuleTools.Attributes;
|
|
using ModuleTools.BindingModels;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace DepartmentBusinessLogic.BindingModels
|
|
{
|
|
/// <summary>
|
|
/// Получение сотрудника
|
|
/// </summary>
|
|
public class EmployeeGetBindingModel : GetBindingModel
|
|
{
|
|
public Guid? UserId { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Сохранение сотрудника
|
|
/// </summary>
|
|
public class EmployeeSetBindingModel : SetBindingModel
|
|
{
|
|
[Required(ErrorMessage = "required")]
|
|
[MapConfiguration("UserId")]
|
|
public Guid UserId { get; set; }
|
|
|
|
[Required(ErrorMessage = "required")]
|
|
[MapConfiguration("LastName")]
|
|
public string LastName { get; set; }
|
|
|
|
[Required(ErrorMessage = "required")]
|
|
[MapConfiguration("FirstName")]
|
|
public string FirstName { 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; }
|
|
|
|
[Required(ErrorMessage = "required")]
|
|
[MapConfiguration("GroupElectricalSafety")]
|
|
public string GroupElectricalSafety { get; set; }
|
|
}
|
|
} |