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

namespace YGNT.QuestionLibrary.Core.Papers
{
    /// <summary>
    /// 试卷试题类型分值设定
    /// </summary>
    public class PaperQuestionTypeScoringSetting : Entity
    {
        /// <summary>
        /// 试卷id
        /// </summary>
        [Required]
        public int PaperId { get; set; }

        /// <summary>
        /// 题型Id
        /// </summary>
        [Required]
        public int QuestionTypeId { get; set; }

        /// <summary>
        /// 评分标准Id
        /// </summary>
        [Required]
        public int ScoringId { get; set; }

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

        /// <summary>
        /// 评分标准
        /// </summary>
        [Required]
        [ForeignKey(nameof(ScoringId))]
        public Scoring Scoring { get; set; }

        /// <summary>
        /// 试题类型
        /// </summary>
        [Required]
        [ForeignKey(nameof(QuestionTypeId))]
        public QuestionType QuestionType { get; set; }
    }
}