using Hotline.Share.Dtos;
using Hotline.Share.Dtos.File;
using Hotline.Share.Enums.Article;
using Hotline.Users;
using SqlSugar;
using XF.Domain.Repository;
namespace Hotline.Article
{
///
/// 公告
///
public class Bulletin : CreationEntity
{
public string Title { get; set; }
[SugarColumn(ColumnDataType = "text")]
public string Content { get; set; }
public string BulletinTypeId { get; set; }
public string BulletinTypeName { get; set; }
///
/// 阅读量
///
public int ReadedNum { get; set; }
///
/// 通知时间
///
public DateTime? BulletinTime { get; set; }
///
/// 失效时间
///
public DateTime? LoseEfficacyTime { get; set; }
///
/// 公告状态
///
public EBulletinState BulletinState { get; set; }
///
/// 发布范围(多选) 位枚举 EPushRange
///
[SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
public List? PushRanges { get; set; }
///
/// 来源单位ID
///
public string SourceOrgId { get; set; }
///
/// 来源单位名称
///
public string SourceOrgName { get; set; }
///
/// 提交时间
///
public DateTime? CommitTime { get; set; }
///
/// 审核意见
///
public string? ExaminOpinion { get; set; }
///
/// 审核人
///
public string? ExaminManId { get; set; }
///
/// 审核人
///
[Navigate(NavigateType.OneToOne, nameof(ExaminManId))]
public User? ExaminMan { get; set; }
///
/// 审核时间
///
public DateTime? ExaminTime { get; set; }
///
/// 是否上架
///
public bool? IsArrive { get; set; }
///
/// 显示位置(多选) 位枚举 BulletinDisplayLocation
///
[SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
public List? DisplayLocation { get; set; }
///
/// 旧数据id
///
public string? OldNoticeId { get; set; }
///
/// 阅读量+1
///
public void Read()
{
ReadedNum++;
}
///
/// 附件
///
[SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
public List? FileJson { get; set; }
}
}