using Hotline.Settings; using Hotline.Settings.Hotspots; using Hotline.Users; using SqlSugar; using System.ComponentModel; using XF.Domain.Repository; using Hotline.Share.Enums.Planlibrary; using Hotline.KnowledgeBase; using Hotline.Share.Dtos.File; namespace Hotline.Planlibrary; /// /// 预案库列表内容 /// [Description("预案库列表")] [SugarIndex("index_planlibrary_hotspotId", nameof(PlanList.HotspotId), OrderByType.Desc)] [SugarIndex("index_planlibrary_attribution", nameof(PlanList.Attribution), OrderByType.Desc)] [SugarIndex("index_planlibrary_creatorOrgId", nameof(PlanList.CreatorOrgId), OrderByType.Desc)] public class PlanList : CreationEntity { /// /// 标题 /// [SugarColumn(ColumnDescription = "标题")] public string Title { get; set; } /// /// 关键词 /// [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true, ColumnDescription = "关键词")] public List? Keywords { get; set; } /// /// 内容 /// [SugarColumn(ColumnDataType = "text", ColumnDescription = "内容")] public string Content { get; set; } /// /// 预案申请状态 /// [SugarColumn(ColumnDescription = "预案申请状态")] public EPlanApplyStatus ApplyStatus { get; set; } /// /// 预案状态 /// [SugarColumn(ColumnDescription = "预案状态")] public EPlanStatus Status { get; set; } /// /// 预案归属 /// [SugarColumn(ColumnDescription = "预案归属")] public string? Attribution { get; set; } /// /// 热点 /// [SugarColumn(ColumnDescription = "热点")] public string? HotspotId { get; set; } /// /// 热点 /// [Navigate(NavigateType.OneToOne, nameof(HotspotId))]//一对一 public Hotspot? HotspotType { get; set; } /// /// 是否公开 /// [SugarColumn(ColumnDescription = "是否公开")] public bool? IsPublic { get; set; } /// /// 是否删除 /// [SugarColumn(ColumnDescription = "是否删除")] public bool? IsDeleted { get; set; } = false; /// /// 阅读次数 /// [SugarColumn(ColumnDescription = "阅读次数")] public int PageView { get; set; } = 0; /// /// 上架时间 /// [SugarColumn(ColumnDescription = "上架时间")] public DateTime? OnShelfTime { get; set; } /// /// 下架时间 /// [SugarColumn(ColumnDescription = "下架时间")] public DateTime? OffShelfTime { get; set; } /// /// 创建人 /// [Navigate(NavigateType.OneToOne, nameof(CreatorId))] public User? Creator { get; set; } /// /// 创建部门 /// [Navigate(NavigateType.OneToOne, nameof(CreatorOrgId))]//一对一 public SystemOrganize? SystemOrganize { get; set; } /// /// 更新时间 /// [SugarColumn(ColumnDescription = "更新时间")] public DateTime? UpdateTime { get; set; } /// /// 审核人ID /// public string? ExaminManId { get; set; } /// /// 审核人 /// [Navigate(NavigateType.OneToOne, nameof(ExaminManId))] public User? ExaminMan { get; set; } /// /// 审核部门ID /// [SugarColumn(ColumnDescription = "审核部门")] public string? ExaminOrganizeId { get; set; } /// /// 审核部门 /// [Navigate(NavigateType.OneToOne, nameof(ExaminOrganizeId))]//一对一 public SystemOrganize? ExaminOrganize { get; set; } /// /// 审核时间 /// public DateTime? ExaminTime { get; set; } /// /// 失效时间 /// [SugarColumn(ColumnDescription = "失效时间")] public DateTime? ExpiredTime { get; set; } /// /// 评分 /// [SugarColumn(ColumnDescription = "评分")] public decimal? Score { get; set; } = decimal.Zero; /// /// 预案库类型关联ID /// [Navigate(NavigateType.OneToMany, nameof(PlanRelationType.PlanId))] public List PlanTypes { get; set; } /// /// 附件 /// [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)] public List? FileJson { get; set; } }