重构项目结构,移除Assignment相关功能,优化Submission模块
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
This commit is contained in:
40
Entities/Contracts/QuestionType.cs
Normal file
40
Entities/Contracts/QuestionType.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Entities.Contracts
|
||||
{
|
||||
[Table("question_types")]
|
||||
public class QuestionType
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
[MaxLength(20)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("subject_id")]
|
||||
public Guid SubjectId { get; set; }
|
||||
[ForeignKey(nameof(SubjectId))]
|
||||
public virtual Subject Subject { get; set; }
|
||||
|
||||
[Column("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("score_rule")]
|
||||
[MaxLength(20)]
|
||||
public string ScoreRule { get; set; }
|
||||
|
||||
[InverseProperty(nameof(Question.QuestionType))]
|
||||
public virtual IEnumerable<Question> Questions { get; set; }
|
||||
|
||||
public QuestionType()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
|
||||
Questions = new HashSet<Question>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user