using Hotline.Share.Enums.KnowledgeBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hotline.Share.Dtos.FlowEngine.Workflow;
using Hotline.Share.Dtos.Users;
using Hotline.Share.Dtos.Org;
using XF.Utility.EnumExtensions;

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

		/// <summary>
		/// 操作类型，新增、删除、编辑
		/// </summary>
		public EKnowledgeApplyType WorkflowModuleStatus { get; set; }

		public string WorkflowModuleStatusText => WorkflowModuleStatus.GetDescription();

		/// <summary>
		/// 审批状态
		/// </summary>
		public EKnowledgeWorkFlowStatus WorkFlowApplyStatus { get; set; }

		public string WorkFlowApplyStatusText => WorkFlowApplyStatus.GetDescription();

		/// <summary>
		/// 审核时间
		/// </summary>
		public DateTime? HandleTime { get; set; }

		/// <summary>
		/// 实际办理意见（办理中...or 最终办理意见）
		/// </summary>
		public string ActualOpinion { get; set; } 

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

		/// <summary>
		/// 流程信息
		/// </summary>
		public WorkflowDto Workflow { get; set; }

		/// <summary>
		/// 部门
		/// </summary>
		public OrgDto SystemOrganize { get; set; }

		/// <summary>
		/// 用户
		/// </summary>
		public UserDto User { get; set; }
	}

	public class BaseDto
	{
		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; }
	}
}
