添加项目文件。
This commit is contained in:
59
Entities/Contracts/AssignmentGroup.cs
Normal file
59
Entities/Contracts/AssignmentGroup.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
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_group")]
|
||||
public class AssignmentGroup
|
||||
{
|
||||
[Key]
|
||||
[Column("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[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 Descript { get; set; }
|
||||
|
||||
|
||||
[Column("total_points")]
|
||||
public decimal? TotalPoints { get; set; }
|
||||
|
||||
[Column("number")]
|
||||
public byte Number { get; set; }
|
||||
|
||||
[Column("parent_group")]
|
||||
public Guid? ParentGroup { get; set; }
|
||||
|
||||
[Column("deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
// Navigation Properties
|
||||
public Assignment Assignment { get; set; }
|
||||
public AssignmentGroup ParentAssignmentGroup { get; set;}
|
||||
public ICollection<AssignmentGroup> ChildAssignmentGroups { get; set; }
|
||||
public ICollection<AssignmentQuestion> AssignmentQuestions { get; set; }
|
||||
|
||||
|
||||
public AssignmentGroup()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
ChildAssignmentGroups = new HashSet<AssignmentGroup>();
|
||||
AssignmentQuestions = new HashSet<AssignmentQuestion>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user