using SqlSugar;
using System;
namespace ZR.Model.System
{
///
/// 文章表
///
[SugarTable("article")]
[Tenant("0")]
public class Article
{
///
/// 文章id
///
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
public int Cid { get; set; }
///
/// 文章标题
///
public string Title { get; set; }
///
/// 发布时间
///
public DateTime? CreateTime { get; set; }
///
/// 更新时间
///
[SugarColumn(IsOnlyIgnoreInsert = true)]
public DateTime? UpdateTime { get; set; }
///
/// 文章内容
///
public string Content { get; set; }
///
/// 作者名
///
public string AuthorName { get; set; }
///
/// 发布者用户id
///
public long UserId { get; set; }
///
/// 文章状态 1、发布 2、草稿
///
public string Status { get; set; }
///
/// 编辑器类型 markdown,html
///
[SugarColumn(ColumnName = "fmt_type")]
public string FmtType { get; set; }
///
/// 文章标签eg:Net5,java
///
public string Tags { get; set; }
///
/// 点击量
///
public int Hits { get; set; }
[SugarColumn(ColumnName = "category_Id")]
public int CategoryId { get; set; }
///
/// 封面地址
///
public string CoverUrl { get; set; }
///
/// 是否公开 1、公开 0、不公开
///
public int IsPublic { get; set; }
[Navigate(NavigateType.OneToOne, nameof(CategoryId), nameof(ArticleCategory.CategoryId))] //自定义关系映射
public ArticleCategory ArticleCategoryNav { get; set; }
}
}