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

53 lines
1.5 KiB
C#
Raw Permalink Normal View History

using CoreModels.ModelsDepartment;
using System;
using System.ComponentModel.DataAnnotations;
2022-03-20 10:10:44 +04:00
using ToolsModule.ManagmentEntity;
namespace DepartmentContract.BindingModels
{
/// <summary>
/// Получение сотрудника
/// </summary>
public class EmployeeGetBindingModel : GetBindingModel
{
public Guid? UserId { get; set; }
}
/// <summary>
/// Сохранение сотрудника
/// </summary>
public class EmployeeSetBindingModel : SetBindingModel, IEmployeeModel
{
[Required(ErrorMessage = "required")]
public Guid UserId { get; set; }
[Required(ErrorMessage = "required")]
public string LastName { get; set; }
[Required(ErrorMessage = "required")]
public string FirstName { get; set; }
public string Patronymic { get; set; }
[Required(ErrorMessage = "required")]
public DateTime DateBirth { get; set; }
[Required(ErrorMessage = "required")]
public string Address { get; set; }
[Required(ErrorMessage = "required")]
public string Email { get; set; }
[Required(ErrorMessage = "required")]
public string MobileNumber { get; set; }
public string HomeNumber { get; set; }
public string Description { get; set; }
public byte[] Photo { get; set; }
[Required(ErrorMessage = "required")]
public string GroupElectricalSafety { get; set; }
}
}