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 ChildrenGroups { get; set; } public ICollection AssignmentQuestions { get; set; } public AssignmentStruct() { Id = Guid.NewGuid(); ChildrenGroups = new HashSet(); AssignmentQuestions = new HashSet(); } } }