using Hotline.Share.Enums.KnowledgeBase;
using Hotline.Share.Requests;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotline.Share.Dtos.Knowledge
{
	public class KnowledgeCollectDto : KnowledgeCollectBaseDto
	{
		/// <summary>
		/// 知识库ID
		/// </summary>
		public string KnowledgeId { get; set; }

		/// <summary>
		/// 知识库
		/// </summary>
		public KnowledgeDto Knowledge { get; set; }

		/// <summary>
		/// 评分
		/// </summary>
		public decimal? Score { get; set; } = decimal.Zero;

		/// <summary>
		/// 是否收藏
		/// </summary>
		public bool? Collect { get; set; }
	}

	public class KnowledgeCollectAddDto
	{
		/// <summary>
		/// 知识库ID
		/// </summary>
		public string KnowledgeId { get; set; }

		/// <summary>
		/// 知识库
		/// </summary>
		public KnowledgeDto Knowledge { get; set; }

		/// <summary>
		/// 评分
		/// </summary>
		public decimal? Score { get; set; } = decimal.Zero;

		/// <summary>
		/// 是否收藏
		/// </summary>
		public bool? Collect { get; set; }

		/// <summary>
		/// 分组Id
		/// </summary>
		public string? KnowledgeCollectGroupId { get; set; }
	}

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

	public class KnowledgeCollectBaseDto
	{
		public DateTime? LastModificationTime { get; set; }

		public bool IsDeleted { get; set; }

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


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

		public string Id { get; set; }

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


		public string? CreatorOrgName { get; set; }

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

		public string? CreatorName { get; set; }
	}

	public record KnowledgeCollectListDto : PagedKeywordRequest
	{
		/// <summary>
		/// 分组Id
		/// </summary>
		public string? KnowledgeCollectGroupId { get; set; }
	}
}
