56 lines
1.2 KiB
C#
56 lines
1.2 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;
|
|
|
|
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("group_id")]
|
|
[ForeignKey("AssignmentGroup")]
|
|
public Guid AssignmentGroupId { get; set; }
|
|
|
|
|
|
[Required]
|
|
[Column("question_number")]
|
|
public byte QuestionNumber { get; set; }
|
|
|
|
|
|
[Column("created_at")]
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
[Column("score")]
|
|
public float? Score { 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>();
|
|
}
|
|
}
|
|
}
|