
using SqlSugar;
using XF.Domain.Repository;

namespace Hotline.Settings.Hotspots
{
    /// <summary>
    /// 事件分类
    /// </summary>
    public class EventCategory: CreationSoftDeleteEntity
    {
        public string EventName { get; set; }
        [SugarColumn(IsNullable = true)]
        public string ParentId { get; set; }
        [SugarColumn(IsNullable = true)]
        public string PYCode { get; set; }
        [SugarColumn(IsNullable = true)]
        public string FullPYCode { get; set; }
        public int OrderBy { get; set; }

        [SugarColumn(IsNullable = true)]
        public string TrunkNum { get; set; }
        /// <summary>
        /// 生成的时候写入
        /// </summary>
        public string EventFullName { get; set; }

        [SugarColumn(IsIgnore = true)]
        public List<EventCategory> Children { get; set; }

        [SugarColumn(IsIgnore = true)]
        public bool HasChild { get; set; }

        [SugarColumn(IsIgnore = true)]
        public bool IsHasChild  => !HasChild;
    }
}
