using Hotline.Share.Dtos.File;
using Hotline.Share.Enums.Settings;
using Hotline.Share.Requests;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Utility.EnumExtensions;

namespace Hotline.Share.Dtos.Settings
{
	public class BusinessTagDto
	{
		/// <summary>
		/// 标签名称
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// 分类
		/// </summary>
		public string Classify { get; set; }

		/// <summary>
		/// 标签类型
		/// </summary>
		public ETagType Type { get; set; } = 0;

		/// <summary>
		/// 业务标签类型
		/// </summary>
		public EBusinessTagType BusinessType { get; set; } = 0;
	}

	public class UpdateBusinessTagDto 
	{
		public string Id { get; set; }

		/// <summary>
		/// 标签名称
		/// </summary>
		public string? Name { get; set; }

		/// <summary>
		/// 分类
		/// </summary>
		public string? Classify { get; set; } 
	}
	public class DeleteBusinessTagDto
	{
		public List<string> Ids { get; set; }
	}

	public class SaveBusinessTagDto
	{
		/// <summary>
		/// 标签名称
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// 业务标签类型
		/// </summary>
		public int BusinessType { get; set; }
	}

	public record BusinessTagListDto : PagedKeywordRequest
	{
		/// <summary>
		/// 标签类型  1 标签  2 分类 
		/// </summary>
		public ETagType Type { get; set; } = 0;

		/// <summary>
		///  业务标签类型  1 工单  2 知识库 
		/// </summary>
		public EBusinessTagType BusinessType { get; set; } = 0;
	}

	public record BusinessTagBindingDto
    {
		/// <summary>
		/// 分类
		/// </summary>
		public string Classify { get; set; }

		/// <summary>
		/// ids
		/// </summary>
		public List<string> ids { get; set; }	

	}

	public record BusinessTagListVo  {

		public string Id { get; set; }
		/// <summary>
		/// 标签名称
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// 分类
		/// </summary>
		public string? Classify { get; set; }

		/// <summary>
		/// 标签类型
		/// </summary>
		public ETagType Type { get; set; }

		public string TypeText => (int)Type > 0 ? Type.GetDescription() : "";

		/// <summary>
		/// 业务标签类型
		/// </summary>
		public EBusinessTagType BusinessType { get; set; }
	
		public string BusinessTypeText => (int)BusinessType > 0 ? BusinessType.GetDescription():"";

		public DateTime? LastModificationTime { get; set; }


		public bool IsDeleted { get; set; }

		/// <summary>
		/// 删除时间
		/// </summary>
		public DateTime? DeletionTime { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreationTime { get; set; }

		/// <summary>
		/// 组织Id
		/// </summary>
		public string? CreatorOrgId { get; set; }

		/// <summary>
		/// 组织编码
		/// </summary>
		public string? CreatorOrgCode { get; set; }

		public string? CreatorOrgName { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		public string? CreatorId { get; set; }

		public string? CreatorName { get; set; }

		/// <summary>
		/// 赋值部门Id
		/// </summary>
		public string? AreaId { get; set; }
	}
}
