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

namespace YGNT.QuestionLibrary.Core.Papers
{
    /// <summary>
    /// 试卷包含学科
    /// </summary>
    public class PaperDiscipline : Entity
    {
        /// <summary>
        /// 试卷id
        /// </summary>
        [Required]
        public int PaperId { get; set; }

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

        /// <summary>
        /// 试卷
        /// </summary>
        [ForeignKey(nameof(PaperId))]
        public Paper Paper { get; set; }

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