
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 30s
- 添加学生提交管理服务 (StudentSubmissionService, StudentSubmissionDetailService) - 新增学生提交相关控制器 (StudentSubmissionController, StudentSubmissionDetailController) - 添加学生提交数据传输对象 (StudentSubmissionDetailDto, StudentSubmissionSummaryDto) - 新增学生提交相关页面组件 (StudentExamView, ExamDetailView, StudentCard等) - 添加学生提交信息卡片组件 (SubmissionInfoCard, TeacherSubmissionInfoCard) - 更新数据库迁移文件以支持提交系统
77 lines
1.9 KiB
C#
77 lines
1.9 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Entities.DTO;
|
|
|
|
namespace Entities.Contracts
|
|
{
|
|
[Table("assignment_questions")]
|
|
public class AssignmentQuestion
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public Guid Id { get; set; }
|
|
|
|
[Column("question_id")]
|
|
public Guid? QuestionId { 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("sequence")]
|
|
public string Sequence { get; set; } = string.Empty;
|
|
|
|
[Column("parent_question_group_id")]
|
|
public Guid? ParentAssignmentQuestionId { get; set; }
|
|
|
|
[Column("group_state")]
|
|
public AssignmentStructType StructType { get; set; } = AssignmentStructType.Question;
|
|
|
|
public QuestionType Type { get; set; } = QuestionType.Unknown;
|
|
|
|
[Column("created_at")]
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
[Column("score")]
|
|
public float? Score { get; set; }
|
|
|
|
public bool BCorrect { get; set; }
|
|
|
|
[Column("deleted")]
|
|
public bool IsDeleted { 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))]
|
|
public AssignmentQuestion? ParentAssignmentQuestion { get; set; }
|
|
public ICollection<AssignmentQuestion> ChildrenAssignmentQuestion { get; set; } = new List<AssignmentQuestion>();
|
|
|
|
|
|
public AssignmentQuestion()
|
|
{
|
|
Id = Guid.NewGuid();
|
|
SubmissionDetails = new HashSet<SubmissionDetail>();
|
|
}
|
|
}
|
|
}
|