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

64 lines
1.6 KiB
C#
Raw Normal View History

2021-04-12 16:57:29 +04:00
using DepartmentBusinessLogic.Enums;
using ModuleTools.Attributes;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels
{
/// <summary>
/// Получение студента
/// </summary>
public class StudentGetBindingModel : GetBindingModel
{
public Guid? UserId { get; set; }
public Guid? StudentGroupId { get; set; }
public StudentState? StudentState { get; set; }
}
/// <summary>
/// Сохранение студента
/// </summary>
public class StudentSetBindingModel : SetBindingModel
{
[Required(ErrorMessage = "required")]
[MapConfiguration("UserId")]
public Guid UserId { get; set; }
[MapConfiguration("StudentGroupId")]
public Guid? StudentGroupId { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("NumberOfBook")]
public string NumberOfBook { 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; }
[MapConfiguration("Email")]
public string Email { get; set; }
[MapConfiguration("Description")]
public string Description { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("StudentState")]
public StudentState StudentState { get; set; }
[MapConfiguration("Photo")]
public byte[] Photo { get; set; }
[MapConfiguration("IsSteward")]
public bool IsSteward { get; set; }
}
}