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

namespace YGNT.QuestionLibrary.Core.Grades
{
    /// <summary>
    /// 年级
    /// </summary>
    public class Grade : Entity, ICreationAudited
    {
        public Grade()
        {
            Disciplines = new List<Discipline>();
        }

        /// <summary>
        /// 年级名称
        /// </summary>
        [Required]
        [MaxLength(30)]
        public string Name { get; set; }

        /// <summary>
        /// 教育类别Id
        /// </summary>
        [Required]
        public int EducationCategoryId { get; set; }

        /// <summary>
        /// 教育类别
        /// </summary>
        [ForeignKey(nameof(EducationCategoryId))]
        [Required]
        public EducationCategory EducationCategory { get; set; }

        /// <summary>
        /// 学科
        /// </summary>
        public List<Discipline> Disciplines { get; set; }


        public DateTime CreationTime { get; set; }


        public long? CreatorUserId { get; set; }
        /// <summary>
        /// 远程ID
        /// </summary>
        public long SourceId { get; set; }
    }
}
