重构项目结构,移除Assignment相关功能,优化Submission模块
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
This commit is contained in:
@@ -24,35 +24,38 @@ namespace Entities.Contracts
|
||||
[MaxLength(65535)]
|
||||
public string? Answer { get; set; }
|
||||
|
||||
|
||||
|
||||
[Required]
|
||||
[Column("type")]
|
||||
[MaxLength(20)]
|
||||
public QuestionType Type { get; set; } = QuestionType.Unknown;
|
||||
|
||||
[Column("difficulty_level")]
|
||||
[MaxLength(10)]
|
||||
public DifficultyLevel DifficultyLevel { get; set; } = DifficultyLevel.easy;
|
||||
public Guid QuestioTypeId { get; set; }
|
||||
[ForeignKey(nameof(QuestioTypeId))]
|
||||
public virtual QuestionType QuestionType { get; set; }
|
||||
|
||||
[Column("subject_area")]
|
||||
public SubjectAreaEnum SubjectArea { get; set; } = SubjectAreaEnum.Unknown;
|
||||
|
||||
public string QType { get; set; } = string.Empty;
|
||||
|
||||
[Column("options")]
|
||||
public string? Options { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
[ForeignKey(nameof(SubjectId))]
|
||||
public virtual Subject Subject { get; set; }
|
||||
|
||||
[Column("key_point")]
|
||||
public Guid? KeyPointId { get; set; }
|
||||
[ForeignKey(nameof(KeyPointId))]
|
||||
public virtual KeyPoint? KeyPoint { get; set; }
|
||||
|
||||
[Column("lesson")]
|
||||
public Guid? LessonId { get; set; }
|
||||
[ForeignKey(nameof(LessonId))]
|
||||
public virtual Lesson? Lesson { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
[Column("created_by")]
|
||||
public Guid CreatorId { get; set; }
|
||||
//[Required]
|
||||
//[Column("created_by")]
|
||||
//public Guid CreatorId { get; set; }
|
||||
//[ForeignKey(nameof(CreatorId))]
|
||||
//public virtual User Creator { get; set; }
|
||||
|
||||
//[Column("difficulty_level")]
|
||||
//public DifficultyLevel DifficultyLevel { get; set; } = DifficultyLevel.easy;
|
||||
|
||||
[Column("options")]
|
||||
public string? Options { get; set; }
|
||||
|
||||
[Column("created_at")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
@@ -63,22 +66,13 @@ namespace Entities.Contracts
|
||||
[Column("deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
|
||||
// Navigation Properties
|
||||
[ForeignKey(nameof(CreatorId))]
|
||||
public User Creator { get; set; }
|
||||
|
||||
[ForeignKey(nameof(KeyPointId))]
|
||||
public KeyPoint? KeyPoint { get; set; }
|
||||
[ForeignKey(nameof(LessonId))]
|
||||
public Lesson? Lesson { get; set; }
|
||||
|
||||
public ICollection<AssignmentQuestion>? AssignmentQuestions { get; set; }
|
||||
[InverseProperty(nameof(ExamQuestion.Question))]
|
||||
public virtual ICollection<ExamQuestion>? ExamQuestions { get; set; }
|
||||
|
||||
public Question()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
AssignmentQuestions = new HashSet<AssignmentQuestion>();
|
||||
ExamQuestions = new HashSet<ExamQuestion>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user