using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
///
/// 文章表
///
public class Article : Entity, IAvailability, ISortable, ISoftDelete, IUpdatedTime, ICreatedUserId, ICreatedTime
{
///
/// 标题
///
[SugarColumn(Length = 128)]
public string Title { get; set; }
///
/// 概要
///
[SugarColumn(Length = 256)]
public string Summary { get; set; }
///
/// 封面图
///
[SugarColumn(Length = 256)]
public string Cover { get; set; }
///
/// 是否置顶
///
public bool IsTop { get; set; }
///
/// 浏览量
///
public int Views { get; set; }
///
/// 作者
///
[SugarColumn(Length = 32)]
public string Author { get; set; }
///
/// 原文地址
///
[SugarColumn(Length = 256)]
public string? Link { get; set; }
///
/// 创作类型
///
public CreationType CreationType { get; set; }
///
/// 文章正文(Html或markdown)
///
[SugarColumn(ColumnDataType = "text")]
public string Content { get; set; }
///
/// 文章正文是否为html代码
///
public bool IsHtml { get; set; }
///
/// 发布时间
///
public DateTime PublishTime { get; set; }
///
/// 可用状态
///
public AvailabilityStatus Status { get; set; }
///
/// 排序值(值越小越靠前)
///
public int Sort { get; set; }
///
/// 是否允许评论
///
public bool IsAllowComments { get; set; }
///
/// 过期时间(过期后文章不显示)
///
public DateTime? ExpiredTime { get; set; }
///
/// 标记删除
///
public bool DeleteMark { get; set; }
///
/// 更新时间
///
public DateTime? UpdatedTime { get; set; }
///
/// 创建人
///
public long CreatedUserId { get; set; }
///
/// 创建时间
///
public DateTime CreatedTime { get; set; }
}