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

61 lines
1.7 KiB
C#
Raw Normal View History

2021-04-06 22:07:11 +04:00
using DepartmentBusinessLogic.Enums;
using ModuleTools.Attributes;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels
{
/// <summary>
/// Получение записи учебного плана
/// </summary>
public class AcademicPlanRecordGetBindingModel : GetBindingModel
{
public Guid? AcademicPlanId { get; set; }
public Guid? DisciplineId { get; set; }
public Semester? Semester { get; set; }
}
/// <summary>
/// Сохранение записи учебного плана
/// </summary>
public class AcademicPlanRecordSetBindingModel : SetBindingModel
{
[Required(ErrorMessage = "required")]
[MapConfiguration("AcademicPlanId")]
public Guid AcademicPlanId { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("DisciplineId")]
public Guid DisciplineId { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("InDepartment")]
public bool InDepartment { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("Semester")]
public Semester Semester { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("Zet")]
public int Zet { get; set; }
[MapConfiguration("AcademicPlanRecordParentId")]
public Guid? AcademicPlanRecordParentId { get; set; }
/// <summary>
/// Является родительской для дисциплин по выбору
/// </summary>
[MapConfiguration("IsParent")]
public bool IsParent { get; set; }
/// <summary>
/// Является факультативной дисциплиной
/// </summary>
[MapConfiguration("IsFacultative")]
public bool IsFacultative { get; set; }
}
}