using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using YGNT.QuestionLibrary.Core.Disciplines;

namespace YGNT.QuestionLibrary.Core.Textbooks
{
    /// <summary>
    /// 教材
    /// </summary>
    public class Textbook : Entity, ISoftDelete, IPassivable
    {
        /// <summary>
        /// 教材名称
        /// </summary>
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 学科id
        /// </summary>
        [Required]
        public int DisciplineId { get; set; }

        /// <summary>
        /// 学科
        /// </summary>
        [ForeignKey(nameof(DisciplineId))]
        public Discipline Discipline { get; set; }

        public bool IsDeleted { get; set; }

        public bool IsActive { get; set; }
    }
}