using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System
{
///
/// 文章表
///
[SugarTable("article")]
[Tenant("0")]
public class Article
{
[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; }
public long UserId { get; set; }
/////
/////
/////
//public string Type { 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; }
[Navigate(NavigateType.OneToOne, nameof(CategoryId), nameof(ArticleCategory.CategoryId))] //自定义关系映射
public ArticleCategory ArticleCategoryNav { get; set; }
}
}