struct&&assiQues
This commit is contained in:
61
Entities/Contracts/AssignmentStruct.cs
Normal file
61
Entities/Contracts/AssignmentStruct.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
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 System.Runtime.InteropServices;
|
||||
|
||||
namespace Entities.Contracts
|
||||
{
|
||||
[Table("assignment_group")]
|
||||
public class AssignmentStruct
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Column("assignment")]
|
||||
[ForeignKey("Assignment")]
|
||||
public Guid? AssignmentId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("title")]
|
||||
[MaxLength(65535)]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Column("descript")]
|
||||
[MaxLength(65535)]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("layout")]
|
||||
public Layout Layout { get; set; }
|
||||
|
||||
[Column("total_points")]
|
||||
public float? Score { get; set; }
|
||||
|
||||
[Column("index")]
|
||||
public byte Index { get; set; }
|
||||
|
||||
[Column("parent_group")]
|
||||
public Guid? ParentStructId { get; set; }
|
||||
|
||||
[Column("deleted")]
|
||||
public bool IsDeleted { get; set; } = false;
|
||||
|
||||
// Navigation Properties
|
||||
public Assignment? Assignment { get; set; }
|
||||
public AssignmentStruct? ParentStruct { get; set;}
|
||||
public ICollection<AssignmentStruct> ChildrenGroups { get; set; }
|
||||
public ICollection<AssignmentQuestion> AssignmentQuestions { get; set; }
|
||||
|
||||
|
||||
public AssignmentStruct()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
ChildrenGroups = new HashSet<AssignmentStruct>();
|
||||
AssignmentQuestions = new HashSet<AssignmentQuestion>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user