
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 30s
- 添加学生提交管理服务 (StudentSubmissionService, StudentSubmissionDetailService) - 新增学生提交相关控制器 (StudentSubmissionController, StudentSubmissionDetailController) - 添加学生提交数据传输对象 (StudentSubmissionDetailDto, StudentSubmissionSummaryDto) - 新增学生提交相关页面组件 (StudentExamView, ExamDetailView, StudentCard等) - 添加学生提交信息卡片组件 (SubmissionInfoCard, TeacherSubmissionInfoCard) - 更新数据库迁移文件以支持提交系统
76 lines
1.6 KiB
C#
76 lines
1.6 KiB
C#
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 Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Entities.Contracts
|
|
{
|
|
[Table("submissions")]
|
|
public class Submission
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public Guid Id { get; set; }
|
|
|
|
[Required]
|
|
[Column("assignment_id")]
|
|
[ForeignKey("Assignment")]
|
|
public Guid AssignmentId { get; set; }
|
|
|
|
[Required]
|
|
[Column("student_id")]
|
|
[ForeignKey("Student")]
|
|
public Guid StudentId { get; set; }
|
|
|
|
[Required]
|
|
[Column("attempt_number")]
|
|
public byte AttemptNumber { get; set; }
|
|
|
|
[Column("submission_time")]
|
|
public DateTime SubmissionTime { get; set; }
|
|
|
|
[Column("overall_grade")]
|
|
public float OverallGrade { get; set; } = 0;
|
|
|
|
[Column("overall_feedback")]
|
|
public string? OverallFeedback { get; set; }
|
|
|
|
[Column("graded_by")]
|
|
[ForeignKey("Grader")]
|
|
public Guid? GraderId { get; set; }
|
|
|
|
[Column("graded_at")]
|
|
public DateTime? GradedAt { get; set; }
|
|
|
|
[Column("deleted")]
|
|
public bool IsDeleted { get; set; }
|
|
|
|
public byte TotalQuesNum { get; set; }
|
|
|
|
public byte ErrorQuesNum { get; set; }
|
|
|
|
public byte TotalScore { get; set; }
|
|
|
|
[Required]
|
|
[Column("status")]
|
|
public SubmissionStatus Status { get; set; }
|
|
|
|
// Navigation Properties
|
|
public Assignment Assignment { get; set; }
|
|
public User Student { get; set; }
|
|
public User Grader { get; set; }
|
|
public ICollection<SubmissionDetail> SubmissionDetails { get; set; }
|
|
|
|
public Submission()
|
|
{
|
|
Id = Guid.NewGuid();
|
|
SubmissionDetails = new HashSet<SubmissionDetail>();
|
|
}
|
|
}
|
|
|
|
}
|