using System.ComponentModel.DataAnnotations; namespace GamificationService.Models.DTO; public class InstructionCreateDTO { public long? Id { get; set; } [Required(ErrorMessage = "Title is required")] public string Title { get; set; } = null!; public string? Description { get; set; } [Required(ErrorMessage = "Paragraphs are required")] public List Paragraphs { get; set; } = null!; [Required(ErrorMessage = "Category id is required")] public long CategoryId { get; set; } /// /// If AssignDate is set, the instruction will be automatically enabled /// when the date is reached. If it's not set, the test will automatically /// obtain the current date as its AssignDate as soon as the instruction /// will be enabled by the IsEnabled parameter. /// public DateTime? AssignDate { get; set; } /// /// When deadline is reached, no more submissions are allowed for this instruction. /// public DateTime? DeadlineDate { get; set; } /// /// Disabled instructions cannot be seen by users. /// Tests for such instructions cannot be submitted either. /// public bool IsEnabled { get; set; } = false; }