using Hotline.Share.Enums.Quality;
using Hotline.Share.Requests;

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

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

		/// <summary>
		/// 评论内容
		/// </summary>
		public string? Content { get; set; }

		/// <summary>
		/// 回复ID
		/// </summary>
		public string? ReplyId { get; set; }

		/// <summary>
		/// 匿名
		/// </summary>
		public bool Cryptonym { get; set; }

		/// <summary>
		/// 回复数
		/// </summary>
		public int ReplyNum { get; set; } = 0;
	}

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

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

		/// <summary>
		/// 评论内容
		/// </summary>
		public string? Content { get; set; }

		/// <summary>
		/// 回复ID
		/// </summary>
		public string? ReplyId { get; set; }

		/// <summary>
		/// 匿名
		/// </summary>
		public bool Cryptonym { get; set; }

		/// <summary>
		/// 回复数
		/// </summary>
		public int ReplyNum { get; set; } = 0;
	}

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

	public class KnowledgeCommentUpdateDto : KnowledgeCommentAddDto
	{
		public string Id { get; set; }
	}
	public class KnowledgeCommentBaseDto
	{
		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 KnowledgeCommentListDto : PagedKeywordRequest
	{
		/// <summary>
		/// 知识库ID
		/// </summary>
		public string KnowledgeId { get; set; }

		/// <summary>
		/// 回复ID
		/// </summary>
		public string? ReplyId { get; set; }

		/// <summary>
		/// 查询全部
		/// </summary>
		public bool? All { get; set; }
	}
}
