using Hotline.Settings; using Hotline.Settings.Hotspots; using Hotline.Share.Enums.KnowledgeBase; using Hotline.Users; using SqlSugar; using XF.Domain.Repository; namespace Hotline.KnowledgeBase; /// /// 知识库文档内容 /// public class Knowledge : WorkflowEntity// WorkflowEntity FullStateEntity { /// /// 知识分类 /// public string KnowledgeTypeId { get; set; } /// /// 热点 /// public string HotspotId { get; set; } /// /// 知识编号 /// public string Code { get; set; } /// /// 标题 /// public string Title { get; set; } /// /// 摘要 /// [SugarColumn(ColumnDataType = "varchar(1000)", IsNullable = true)] public string Summary { get; set; } /// /// 内容 /// [SugarColumn(ColumnDataType = "text")] public string Content { get; set; } /// /// 浏览量 /// public int PageView { get; set; } = 0; /// /// 是否公开 /// public bool IsPublic { get; set; } /// /// 文档状态 /// public EKnowledgeStatus Status { get; set; } /// /// 上架时间 /// public DateTime? OnShelfTime { get; set; } /// /// 下架时间 /// public DateTime? OffShelfTime { get; set; } /// /// 过期时间 /// public DateTime? ExpiredTime { get; set; } /// /// 关键词 /// [SugarColumn(IsNullable = true)] public string Keywords { get; set; } /// /// 版本号 /// public int Version { get; set; } = 0; /// /// 外部数据(为前端提供级联功能) /// [SugarColumn(IsNullable = true)] public string? HotspotExternal { get; set; } /// /// 附件 /// [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)] public List Additions { get; set; } /// /// 关联知识 /// [SugarColumn(ColumnDataType = "json", IsJson = true,IsNullable =true)] public List Knowledges { get; set; } /// /// 分类 /// [Navigate(NavigateType.OneToOne, nameof(KnowledgeTypeId))]//一对一 public KnowledgeType KnowledgeType { get; set; } /// /// 部门 /// [Navigate(NavigateType.OneToOne, nameof(CreatorOrgId))]//一对一 public SystemOrganize SystemOrganize { get; set; } /// /// 用户 /// [Navigate(NavigateType.OneToOne, nameof(CreatorId))]//一对一 public User User { get; set; } /// /// 热点 /// [Navigate(NavigateType.OneToOne, nameof(HotspotId))]//一对一 public Hotspot HotspotType { get; set; } }