using DepartmentBusinessLogic.Enums;
using ModuleTools.Attributes;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels
{
///
/// Получение студента
///
public class StudentGetBindingModel : GetBindingModel
{
public Guid? UserId { get; set; }
public Guid? StudentGroupId { get; set; }
public StudentState? StudentState { get; set; }
}
///
/// Сохранение студента
///
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; }
}
}