using Hotline.Share.Dtos; using Hotline.Share.Enums.Article; using Hotline.Share.Enums.Snapshot; using Hotline.Users; using SqlSugar; using System.ComponentModel; using XF.Domain.Repository; namespace Hotline.Snapshot; /// /// 随手拍公告 /// [Description("随手拍公告")] public class SnapshotBulletin : CreationEntity { /// /// 标题 /// [SugarColumn(ColumnDescription = "标题")] public string Title { get; set; } /// /// No /// [SugarColumn(ColumnDescription = "No")] public string? No { get; set; } /// /// 所属部门 /// [SugarColumn(ColumnDescription = "所属部门")] public string? DepartmentName { get; set; } /// /// 所属部门Id /// [SugarColumn(ColumnDescription = "所属部门Id")] public string? DepartmentId { get; set; } /// /// 来源部门名称 /// [SugarColumn(ColumnDescription = "来源部门名称")] public string? SourceOrgName { get; set; } /// /// 内容 /// [SugarColumn(ColumnDataType = "text")] public string Content { get; set; } /// /// 字典中添加类型Id /// [SugarColumn(ColumnDescription = "字典中添加类型Id")] public string SnapshotBulletinTypeId { get; set; } /// /// 系统字典中添加类型名称 /// [SugarColumn(ColumnDescription = "系统字典中添加类型名称")] public string SnapshotBulletinTypeName { get; set; } /// /// 阅读量 /// [SugarColumn(ColumnDescription = "阅读量")] public int ReadedNum { get; set; } /// /// 公告状态 /// [SugarColumn(ColumnDescription = "公告状态")] public EBulletinState BulletinState { get; set; } /// /// 提交时间 /// [SugarColumn(ColumnDescription = "提交时间")] public DateTime? CommitTime { get; set; } /// /// 审核意见 /// [SugarColumn(ColumnDescription = "审核意见")] public string? ExaminOpinion { get; set; } /// /// 审核人 /// [SugarColumn(ColumnDescription = "审核人")] public string? ExaminManId { get; set; } /// /// 审核人 /// [Navigate(NavigateType.OneToOne, nameof(ExaminManId))] public User? ExaminMan { get; set; } /// /// 审核时间 /// [SugarColumn(ColumnDescription = "审核时间")] public DateTime? ExaminTime { get; set; } /// /// 是否公开 /// [SugarColumn(ColumnDescription = "是否公开")] public bool? IsOpen { get; set; } /// /// 是否加粗 /// [SugarColumn(ColumnDescription = "是否加粗")] public bool? IsBold { get; set; } /// /// 网站公开 /// [SugarColumn(ColumnDescription = "网站公开")] public bool? IsOpenWebsite { get; set; } /// /// 微博公开 /// [SugarColumn(ColumnDescription = "微博公开")] public bool? IsWeibo { get; set; } /// /// 微信公开 /// [SugarColumn(ColumnDescription = "微信公开")] public bool? IsWeChat { get; set; } /// /// 是否置顶 /// [SugarColumn(ColumnDescription = "是否置顶")] public bool? IsTop { get; set; } /// /// 是否弹窗 /// [SugarColumn(DefaultValue = "f", ColumnDescription = "是否弹窗")] public bool IsPopup { get; set; } /// /// 通知时间 /// [SugarColumn(ColumnDescription = "通知时间")] public DateTime? BulletinTime { get; set; } /// /// 视频地址 /// [SugarColumn(ColumnDescription = "视频地址")] public string? VideoPath { get; set; } /// /// 来源方式 /// [SugarColumn(ColumnDescription = "来源方式")] public string? SourceMode { get; set; } /// /// 上下架 /// [SugarColumn(ColumnDescription = "上下架")] public bool? IsArrive { get; set; } /// /// 阅读量+1 /// public void Read() { ReadedNum++; } /// /// 公告形式 /// [SugarColumn(ColumnDescription = "公告形式")] public EBulletinShape? Shape { get; set; } /// /// 志愿者类型Id /// [SugarColumn(ColumnDescription = "志愿者类型Id", ColumnDataType = "json", IsJson = true)] public List? SafetyTypeId { get; set; } /// /// 视频封面 /// [SugarColumn(ColumnDescription = "视频封面")] public string? VideoCoverImgUrl { get; set; } /// /// 视频名称 /// [SugarColumn(ColumnDescription = "视频封面")] public string? VideoName { get; set; } }