添加项目文件。
This commit is contained in:
50
Entities/Contracts/AssignmentQuestion.cs
Normal file
50
Entities/Contracts/AssignmentQuestion.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
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("assignment_questions")]
|
||||
public class AssignmentQuestion
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("question_id")]
|
||||
[ForeignKey("Question")]
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("question_number")]
|
||||
public uint QuestionNumber { get; set; }
|
||||
|
||||
[Column("created_at")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("detail_id")]
|
||||
[ForeignKey("AssignmentGroup")]
|
||||
public Guid AssignmentGroupId { get; set; }
|
||||
|
||||
[Column("deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
|
||||
public Question Question { get; set; }
|
||||
public ICollection<SubmissionDetail> SubmissionDetails { get; set; }
|
||||
public AssignmentGroup AssignmentGroup { get; set; }
|
||||
|
||||
public AssignmentQuestion()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
SubmissionDetails = new HashSet<SubmissionDetail>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user