using Hotline.Share.Dtos.FlowEngine.Workflow;
using Hotline.Share.Dtos.Hotspots;
using Hotline.Share.Dtos.Order;
using Hotline.Share.Dtos.Org;
using Hotline.Share.Enums.KnowledgeBase;
using XF.Utility.EnumExtensions;
namespace Hotline.Share.Dtos.Knowledge
{
public record KnowledgeBaseDataDto
{
///
/// 知识ID
///
public string Id { get; set; }
///
/// 标题
///
public string Title { get; set; }
public KnowledgeTypeDto KnowledgeType { get; set; }
///
/// 知识分类
///
public string KnowledgeTypeName => KnowledgeType !=null ? KnowledgeType.SpliceName : string.Empty;
public HotspotDto HotspotType { get; set; }
///
/// 热点
///
public string HotspotName => HotspotType != null ? HotspotType.HotSpotFullName : string.Empty;
///
/// 申请人
///
public string CreatorName { get; set; }
///
/// 浏览量
///
public int PageView { get; set; }
///
/// 文档状态
///
public EKnowledgeStatus Status => Status != EKnowledgeStatus.Drafts && DateTime.Now > ExpiredTime ? EKnowledgeStatus.Overdue : Status;
///
/// 文档状态名称
///
public string StatusName => Status.GetDescription();
///
/// 流程ID
///
public string WorkflowId { get; set; }
///
/// 是否公开
///
public bool IsPublic { get; set; }
///
/// 过期时间
///
public DateTime? ExpiredTime { get; set; }
}
///
/// 知识库
///
public record KnowledgeDataDto : KnowledgeBaseDataDto
{
///
/// 申请部门
///
public string CreatorOrgName { get; set; }
///
/// 申请部门ID
///
public string CreatorOrgId { get; set; }
///
/// 是否上架
///
public bool IsOnShelf { get; set; }
///
/// 上架时间
///
public DateTime? OnShelfTime { get; set; }
///
/// 更新时间
///
public DateTime? LastModificationTime { get; set; }
///
/// 下架时间
///
public DateTime? OffShelfTime { get; set; }
///
/// 申请时间
///
public DateTime CreationTime { get; set; }
///
/// 是否可办理
///
public bool IsCanHandle { get; set; }
///
/// 知识归属
///
public string? Attribution { get; set; }
public WorkflowDto? Workflow { get; set; }
///
/// 来源部门
///
public string? SourceOrganizeId { get; set; }
///
/// 来源部门
///
public OrgDto SourceOrganize { get; set; }
}
///
/// 审核管理
///
public record KnowledgeApprovalDataDto : KnowledgeBaseDataDto
{
///
/// 申请部门
///
public string CreateBMName { get; set; }
///
/// 审核类型
///
public EKnowledgeApplyType WorkflowModuleStatus { get; set; }
///
/// 审核类型名称
///
public string WorkflowModuleStatusName => WorkflowModuleStatus.GetDescription();
///
/// 审批状态
///
public EKnowledgeWorkFlowStatus WorkFlowApplyStatus { get; set; }
///
/// 审核状态名称
///
public string WorkFlowApplyStatusName => WorkFlowApplyStatus.GetDescription();
///
/// 到达当前办理节点时间
///
public DateTime? CurrentStepTime { get; set; }
///
/// 申请时间
///
public DateTime CreationTime { get; set; }
///
/// 审核时间
///
public DateTime? HandleTime { get; set; }
///
/// 是否可以办理
///
public bool CanHandle { get; set; }
}
///
/// 知识检索
///
public record KnowledgeRetrievalDataDto
{
///
/// 知识ID
///
public string Id { get; set; }
///
/// 标题
///
public string Title { get; set; }
///
/// 摘要
///
public string Summary { get; set; }
///
/// 内容
///
public string Content { get; set; }
///
/// 评分
///
public decimal Score { get; set; }
///
/// 评论数
///
public int CommentNum { get; set; }
///
/// 浏览量
///
public int PageView { get; set; }
///
/// 创建时间
///
public DateTime CreationTime { get; set; }
public string? CreatorOrgName { get; set; }
///
/// 来源部门
///
public OrgDto SourceOrganize { get; set; }
}
///
/// 获取知识创建部门信息
///
public record KnowledgeCreateBMDataDto
{
///
/// 知识ID
///
public string Id { get; set; }
///
/// 知识Code
///
public string Code { get; set; }
///
/// 标题
///
public string Title { get; set; }
///
/// 处理部门Id
///
public string DepartmentId { get; set; }
///
/// 处理部门名称
///
public string Department { get; set; }
}
///
/// 我的申请返回
///
public record KnowledgeDeleteApplyDataDto : KnowledgeBaseDataDto
{
///
/// 申请部门
///
public string CreationBMName { get; set; }
///
/// 审批状态
///
public EKnowledgeWorkFlowStatus WorkFlowApplyStatus { get; set; }
///
/// 审批状态名称
///
public string WorkFlowApplyStatusName => WorkFlowApplyStatus.GetDescription();
///
/// 申请时间
///
public DateTime CreationTime { get; set; }
}
}