struct&&assiQues
This commit is contained in:
36
Entities/Contracts/Textbook/Textbook.cs
Normal file
36
Entities/Contracts/Textbook/Textbook.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
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("textbook")]
|
||||
public class Textbook
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Grade Grade { get; set; } = Grade.Unknown;
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public Publisher Publisher { get; set; } = Publisher.部编版;
|
||||
|
||||
public SubjectAreaEnum SubjectArea { get; set; } = SubjectAreaEnum.Unknown;
|
||||
|
||||
[InverseProperty(nameof(Lesson.Textbook))]
|
||||
public ICollection<Lesson> Lessons { get; set; }
|
||||
|
||||
public Textbook()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
Lessons = new HashSet<Lesson>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user