70 lines
1.8 KiB
C#
70 lines
1.8 KiB
C#
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; }
|
|
|
|
public string NumberOfBook { 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("Iduniv")]
|
|
public string Iduniv { 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; }
|
|
}
|
|
} |