AsiignmentStruct

This commit is contained in:
SpecialX
2025-06-20 18:58:11 +08:00
parent d20c051c51
commit 681c0862b6
32 changed files with 414 additions and 752 deletions

View File

@@ -18,23 +18,28 @@ namespace Entities.Contracts
public Guid Id { get; set; }
[Column("question_id")]
public Guid QuestionId { get; set; }
public Guid? QuestionId { get; set; }
[Required]
[Column("group_id")]
[ForeignKey("AssignmentGroup")]
public Guid AssignmentStructId { get; set; }
[Column("assignment")]
[ForeignKey("Assignment")]
public Guid? AssignmentId { get; set; }
[Column("title")]
[MaxLength(1024)]
public string? Title { get; set; }
[Column("description")]
public Guid? QuestionContextId { get; set; }
[Required]
[Column("question_number")]
public byte Index { get; set; }
[Column("parent_question_group_id")]
public Guid? ParentAssignmentQuestionId { get; set; }
[Column("group_state")]
public QuestionGroupState GroupState { get; set; } = QuestionGroupState.Standalone;
public AssignmentStructType StructType { get; set; } = AssignmentStructType.Question;
[Column("created_at")]
public DateTime CreatedAt { get; set; }
@@ -42,13 +47,17 @@ namespace Entities.Contracts
[Column("score")]
public float? Score { get; set; }
[Column("deleted")]
public bool IsDeleted { get; set; }
public Question Question { get; set; }
public AssignmentStruct AssignmentStruct { get; set; }
public Question? Question { get; set; }
public Assignment? Assignment { get; set; }
[ForeignKey(nameof(QuestionContextId))]
public QuestionContext? QuestionContext { get; set; }
public ICollection<SubmissionDetail> SubmissionDetails { get; set; }
[ForeignKey(nameof(ParentAssignmentQuestionId))]