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

namespace YGNT.QuestionLibrary.Core.EducationCategories
{
    /// <summary>
    /// 教育类别
    /// </summary>
    public class EducationCategory : Entity, ICreationAudited, IPassivable
    {
        public EducationCategory()
        {
            Grade = new List<Grade>();
        }

        /// <summary>
        /// 类别名称
        /// </summary>
        [Required]
        public string Name { get; set; }


        /// <summary>
        /// 年级
        /// </summary>
        public List<Grade> Grade { get; set; }



        public static EducationCategory Create(string name, bool isActive = false)
        {
            return new EducationCategory()
            {
                Name = name,
                IsActive = isActive
            };
        }


        public DateTime CreationTime { get; set; }

        public long? CreatorUserId { get; set; }


        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsActive { get; set; }
        /// <summary>
        /// 远程ID
        /// </summary>
        public long SourceId { get; set; }
    }
}