using Hotline.KnowledgeBase;
using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;

namespace Hotline.Settings.Hotspots
{
	/// <summary>
	/// 热点基础数据
	/// </summary>
	[Description("热点")]
	[SugarIndex("index_hotspot_parentId", nameof(Hotspot.ParentId), OrderByType.Desc)]
	[SugarIndex("index_hotspot_fullName", nameof(Hotspot.HotSpotFullName), OrderByType.Desc)]
	public class Hotspot : CreationSoftDeleteEntity
    {
        public string HotSpotName { 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 string ProvinceCode { get; set; }
        public int OrderBy { get; set; }
        public string TrunkNum { get; set; }
        /// <summary>
        /// 生成的时候写入
        /// </summary>
        public string HotSpotFullName { get; set; }

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

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

    }
}
