重构试卷相关内容
This commit is contained in:
@@ -16,10 +16,12 @@ namespace Entities.Contracts
|
||||
[Column("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("question_id")]
|
||||
[ForeignKey("Question")]
|
||||
public Guid QuestionId { get; set; }
|
||||
public Guid? QuestionId { get; set; } // 设为可空
|
||||
|
||||
// 当 IsGroup 为 true 时,此为 QuestionGroup 的外键
|
||||
[Column("question_group_id")] // 新增一个外键列
|
||||
public Guid? QuestionGroupId { get; set; } // 设为可空
|
||||
|
||||
[Required]
|
||||
[Column("group_id")]
|
||||
@@ -38,11 +40,16 @@ namespace Entities.Contracts
|
||||
[Column("score")]
|
||||
public float? Score { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("bgroup")]
|
||||
public bool IsGroup { get; set; }
|
||||
|
||||
[Column("deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
|
||||
public Question Question { get; set; }
|
||||
public QuestionGroup QuestionGroup { get; set; }
|
||||
public ICollection<SubmissionDetail> SubmissionDetails { get; set; }
|
||||
public AssignmentGroup AssignmentGroup { get; set; }
|
||||
|
||||
|
Reference in New Issue
Block a user