namespace AgriculturalPlatform.Api.Models;
/// 通知公告
public class Announcement
{
public int Id { get; set; }
public string Title { get; set; } = string.Empty;
/// 内容(富文本/纯文本)
public string Content { get; set; } = string.Empty;
/// 类型(数据字典 announcement_type:notice=通知 announce=公告)
public string Type { get; set; } = "notice";
/// 发布范围组织 Id(逗号分隔;空=全部可见)
public string ScopeOrgIds { get; set; } = string.Empty;
/// 是否置顶
public bool IsPinned { get; set; }
/// 发布人
public int? PublisherId { get; set; }
public User? Publisher { get; set; }
public DateTime PublishedAt { get; set; } = DateTime.Now;
public DateTime CreatedAt { get; set; } = DateTime.Now;
}
/// 公告已读记录
public class AnnouncementRead
{
public int Id { get; set; }
public int AnnouncementId { get; set; }
public int UserId { get; set; }
public DateTime ReadAt { get; set; } = DateTime.Now;
}