37 lines
812 B
C#
37 lines
812 B
C#
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 GradeEnum Grade { get; set; } = GradeEnum.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>();
|
|
}
|
|
}
|
|
|
|
}
|