添加项目文件。
This commit is contained in:
66
Entities/Contracts/SubmissionDetail.cs
Normal file
66
Entities/Contracts/SubmissionDetail.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
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;
|
||||
|
||||
namespace Entities.Contracts
|
||||
{
|
||||
[Table("submission_details")]
|
||||
public class SubmissionDetail
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("submission_id")]
|
||||
[ForeignKey("Submission")]
|
||||
public Guid SubmissionId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("student_id")]
|
||||
[ForeignKey("User")]
|
||||
public Guid StudentId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("assignment_question_id")]
|
||||
[ForeignKey("AssignmentQuestion")]
|
||||
public Guid AssignmentQuestionId { get; set; }
|
||||
|
||||
[Column("student_answer")]
|
||||
public string StudentAnswer { get; set; }
|
||||
|
||||
[Column("is_correct")]
|
||||
public bool? IsCorrect { get; set; }
|
||||
|
||||
[Column("points_awarded")]
|
||||
[Precision(5, 2)]
|
||||
public decimal? PointsAwarded { get; set; }
|
||||
|
||||
[Column("teacher_feedback")]
|
||||
public string TeacherFeedback { get; set; }
|
||||
|
||||
[Column("created_at")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[Column("updated_at")]
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
[Column("deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
// Navigation Properties
|
||||
public Submission Submission { get; set; }
|
||||
public User User { get; set; }
|
||||
public AssignmentQuestion AssignmentQuestion { get; set; }
|
||||
|
||||
public SubmissionDetail()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user