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

87 lines
2.6 KiB
C#
Raw Normal View History

using ModuleTools.Attributes;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels
{
/// <summary>
/// Получение преподавателя
/// </summary>
public class LecturerGetBindingModel : GetBindingModel
{
public Guid? UserId { get; set; }
public Guid? LecturerPostId { get; set; }
public Guid? LecturerAcademicRankId { get; set; }
public Guid? LecturerAcademicDegreeId { get; set; }
}
/// <summary>
/// Сохранение преподавателя
/// </summary>
public class LecturerSetBindingModel : SetBindingModel
{
[Required(ErrorMessage = "required")]
[MapConfiguration("UserId")]
public Guid UserId { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("LecturerPostId")]
public Guid LecturerPostId { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("LecturerPostRate")]
public decimal LecturerPostRate { get; set; }
[MapConfiguration("LecturerAcademicRankId")]
public Guid? LecturerAcademicRankId { get; set; }
[MapConfiguration("LecturerAcademicDegreeId")]
public Guid? LecturerAcademicDegreeId { 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; }
[MapConfiguration("Abbreviation")]
public string Abbreviation { 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("OnlyForPrivate")]
public bool OnlyForPrivate { get; set; }
}
}