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

59 lines
1.9 KiB
C#
Raw Normal View History

2021-04-03 19:03:56 +04:00
using ModuleTools.Attributes;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels
{
/// <summary>
/// Получение дисциплины
/// </summary>
public class DisciplineGetBindingModel : GetBindingModel
{
/// <summary>
/// Выбрка по блокам
/// </summary>
public Guid? DisciplineBlockId { get; set; }
/// <summary>
/// Поиск по названию
/// </summary>
public string DisciplineName { get; set; }
}
/// <summary>
/// Сохранение дисциплины
/// </summary>
public class DisciplineSetBindingModel : SetBindingModel
{
[Required(ErrorMessage = "required")]
[MapConfiguration("DisciplineBlockId")]
public Guid DisciplineBlockId { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("DisciplineName")]
public string DisciplineName { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("DisciplineShortName")]
public string DisciplineShortName { get; set; }
[MapConfiguration("Description")]
public string Description { get; set; }
2021-04-03 19:03:56 +04:00
[MapConfiguration("DisciplineBlueAsteriskName")]
public string DisciplineBlueAsteriskName { get; set; }
/// <summary>
/// Используется только в расчетах, не сохраняется
/// </summary>
[MapConfiguration("DisciplineBlueAsteriskCode")]
public string DisciplineBlueAsteriskCode { get; set; }
/// <summary>
/// Используется только в расчетах, не сохраняется
/// </summary>
[MapConfiguration("DisciplineBlueAsteriskPracticCode")]
public string DisciplineBlueAsteriskPracticCode { get; set; }
}
}