using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using YGNT.QuestionLibrary.Core.Disciplines;
using YGNT.QuestionLibrary.Core.Grades;

namespace YGNT.QuestionLibrary.Core.Testings
{
    /// <summary>
    /// 测验
    /// </summary>
    public class Testing : Entity, IFullAudited
    {
        /// <summary>
        /// 测验名称
        /// </summary>
        [Required]
        [MaxLength(30)]
        public string Name { get; set; }
        /// <summary>
        /// 测验类型
        /// </summary>
        public int TestingType { get; set; }
        /// <summary>
        /// 测验时间(时间戳,毫秒)
        /// </summary>
        [Required]
        public int TestingTime { get; set; }
        /// <summary>
        /// 测验试题数
        /// </summary>
        public int TotalQuestion { get; set; }
        /// <summary>
        /// 学段编号
        /// </summary>
        public int EducationCategorieId { get; set; }
        /// <summary>
        /// 年级
        /// </summary>
        public Grade Grade { get; set; }
        /// <summary>
        /// 年级编号
        /// </summary>
        public int GradeId { get; set; }
        public Discipline Discipline { get; set; }
        /// <summary>
        /// 科目关系ID
        /// </summary>
        public int DisciplineId { get; set; }
        /// <summary>
        /// 教材
        /// </summary>
        public int TextbookId { get; set; }
        /// <summary>
        /// 章节
        /// </summary>
        public int ChapterId { get; set; }

        /// <summary>
        /// 科目ID 对应三方数据科目
        /// </summary>
        public int CourseId { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public long? CreatorUserId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 最后修改人
        /// </summary>

        public long? LastModifierUserId { get; set; }
        /// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime? LastModificationTime { get; set; }
        /// <summary>
        /// 删除人
        /// </summary>
        public long? DeleterUserId { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? DeletionTime { get; set; }
        /// <summary>
        /// 删除标记
        /// </summary>
        public bool IsDeleted { get; set; }

        public List<TestingKnowledge> TestingKnowledges { get; set; } = new List<TestingKnowledge>();
    }
}
