chore: removed everything related to instructions
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GamificationService.Models.Database;
|
||||
|
||||
public class Instruction
|
||||
{
|
||||
[Key]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Title is required")]
|
||||
public string Title { get; set; } = null!;
|
||||
|
||||
public string? Description { get; set; }
|
||||
|
||||
public long CategoryId { get; set; }
|
||||
[Required(ErrorMessage = "Category must be specified")]
|
||||
public InstructionCategory Category { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<InstructionParagraph> Paragraphs { get; set; }
|
||||
|
||||
public long? InstructionTestId { get; set; }
|
||||
public InstructionTest? InstructionTest { get; set; }
|
||||
|
||||
public DateTime? AssignDate { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public DateTime? DeadlineDate { get; set; }
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GamificationService.Models.Database;
|
||||
|
||||
public class InstructionCategory
|
||||
{
|
||||
[Key]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Title is required")]
|
||||
public string Title { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GamificationService.Models.Database;
|
||||
|
||||
public class InstructionParagraph
|
||||
{
|
||||
[Key]
|
||||
public long Id { get; set; }
|
||||
|
||||
public long InstructionId { get; set; }
|
||||
[Required(ErrorMessage = "Must be linked to instruction")]
|
||||
|
||||
public int Order { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Paragraph text is required")]
|
||||
public string Text { get; set; } = null!;
|
||||
|
||||
public string? ImageUrl { get; set; }
|
||||
|
||||
public string? VideoUrl { get; set; }
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using GamificationService.Utils.Enums;
|
||||
|
||||
namespace GamificationService.Models.Database;
|
||||
|
||||
public class InstructionTest
|
||||
{
|
||||
[Key]
|
||||
public long Id { get; set; }
|
||||
|
||||
// Reserved just in case
|
||||
[MaxLength(300, ErrorMessage = "Title cannot be longer than 300 characters")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
public virtual ICollection<InstructionTestQuestion> Questions { get; set; }
|
||||
|
||||
public int MaxAttempts { get; set; } = 10;
|
||||
|
||||
public double MinScore { get; set; } = 0.6;
|
||||
|
||||
public InstructionTestScoreCalcMethod ScoreCalcMethod { get; set; } = InstructionTestScoreCalcMethod.MaxGrade;
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GamificationService.Models.Database;
|
||||
|
||||
public class InstructionTestQuestion
|
||||
{
|
||||
[Key]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Must be tied to an instruction test")]
|
||||
public InstructionTest InstructionTest { get; set; } = null!;
|
||||
public long InstructionTestId { get; set; }
|
||||
|
||||
public int Order { get; set; }
|
||||
|
||||
public bool IsMultipleAnswer { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Must have question text")]
|
||||
public string Question { get; set; } = null!;
|
||||
|
||||
[Required(ErrorMessage = "Must have answer options")]
|
||||
public ICollection<string> Answers { get; set; } = null!;
|
||||
|
||||
[Required(ErrorMessage = "Must have correct answer ids")]
|
||||
public ICollection<int> CorrectAnswers { get; set; } = null!;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace GamificationService.Models.Database;
|
||||
|
||||
public class InstructionTestResult
|
||||
{
|
||||
[Key]
|
||||
public long Id { get; set; }
|
||||
|
||||
public long InstructionTestId { get; set; }
|
||||
[Required(ErrorMessage = "Instruction test is required")]
|
||||
public virtual InstructionTest InstructionTest { get; set; } = null!;
|
||||
|
||||
public long UserId { get; set; }
|
||||
[Required(ErrorMessage = "User is required")]
|
||||
public ApplicationUser User { get; set; } = null!;
|
||||
|
||||
[Range(0, 100, ErrorMessage = "Score must be a number from 0 to 100")]
|
||||
public int Score { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user