struct&&assiQues
This commit is contained in:
36
Entities/Contracts/Textbook/KeyPoint.cs
Normal file
36
Entities/Contracts/Textbook/KeyPoint.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entities.Contracts
|
||||
{
|
||||
[Table("key_point")]
|
||||
public class KeyPoint
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[StringLength(255)]
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
|
||||
[Required]
|
||||
public Guid LessonID { get; set; }
|
||||
|
||||
[ForeignKey(nameof(LessonID))]
|
||||
public Lesson Lesson { get; set; }
|
||||
|
||||
|
||||
public ICollection<Question> Questions { get; set; }
|
||||
|
||||
public KeyPoint()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
Questions = new HashSet<Question>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user