using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Domain.Entities;
using XF.Domain.Repository;

namespace Hotline.KnowledgeBase
{
	/// <summary>
	/// 知识库关联类型
	/// </summary>
	[Description("知识库关联类型")]
	[SugarIndex("index_knowledgeRelationType_spliceName", nameof(KnowledgeRelationType.KnowledgeTypeSpliceName), OrderByType.Desc)]
	public class KnowledgeRelationType : ITable, IEntity
    {
        /// <summary>
        /// 知识库ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string KnowledgeId { get; set; }

        /// <summary>
        /// 知识库类型ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string KnowledgeTypeId { get; set; }

		/// <summary>
		/// 知识库类型名称
		/// </summary>
		public string KnowledgeTypeName { get; set; }


		/// <summary>
		/// 知识库类型名称
		/// </summary>
		public string KnowledgeTypeSpliceName { get; set; }

		/// <summary>
		/// 类型关联机构
		/// </summary>
		[Navigate(NavigateType.OneToOne, nameof(KnowledgeTypeId))]
		public KnowledgeType KnowledgeType { get; set; }
	}
}
