struct&&assiQues
This commit is contained in:
@@ -6,6 +6,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Entities.DTO;
|
||||
|
||||
namespace Entities.Contracts
|
||||
{
|
||||
@@ -17,41 +18,43 @@ namespace Entities.Contracts
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Column("question_id")]
|
||||
public Guid? QuestionId { get; set; } // 设为可空
|
||||
|
||||
// 当 IsGroup 为 true 时,此为 QuestionGroup 的外键
|
||||
[Column("question_group_id")] // 新增一个外键列
|
||||
public Guid? QuestionGroupId { get; set; } // 设为可空
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("group_id")]
|
||||
[ForeignKey("AssignmentGroup")]
|
||||
public Guid AssignmentGroupId { get; set; }
|
||||
|
||||
public Guid AssignmentStructId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("question_number")]
|
||||
public byte QuestionNumber { get; set; }
|
||||
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;
|
||||
|
||||
[Column("created_at")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[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 AssignmentStruct AssignmentStruct { get; set; }
|
||||
public ICollection<SubmissionDetail> SubmissionDetails { get; set; }
|
||||
public AssignmentGroup AssignmentGroup { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ParentAssignmentQuestionId))]
|
||||
public AssignmentQuestion? ParentAssignmentQuestion { get; set; }
|
||||
public ICollection<AssignmentQuestion> ChildrenAssignmentQuestion { get; set; } = new List<AssignmentQuestion>();
|
||||
|
||||
|
||||
public AssignmentQuestion()
|
||||
{
|
||||
|
Reference in New Issue
Block a user