优化文章管理
This commit is contained in:
@@ -17,7 +17,7 @@ namespace ZR.Model.System
|
||||
public string Title { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 文章内容
|
||||
/// </summary>
|
||||
@@ -38,16 +38,21 @@ namespace ZR.Model.System
|
||||
/// <summary>
|
||||
/// 编辑器类型 markdown,html
|
||||
/// </summary>
|
||||
public string Fmt_type { get; set; }
|
||||
[SugarColumn(ColumnName = "fmt_type")]
|
||||
public string FmtType { get; set; }
|
||||
/// <summary>
|
||||
/// 文章标签eg:Net5,java
|
||||
/// </summary>
|
||||
public string Tags { get; set; }
|
||||
public int Hits { get; set; }
|
||||
public int Category_Id { get; set; }
|
||||
[SugarColumn(ColumnName = "category_Id")]
|
||||
public int CategoryId { get; set; }
|
||||
/// <summary>
|
||||
/// 封面地址
|
||||
/// </summary>
|
||||
public string CoverUrl { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToOne, nameof(CategoryId), nameof(ArticleCategory.CategoryId))] //自定义关系映射
|
||||
public ArticleCategory ArticleCategoryNav { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text;
|
||||
|
||||
namespace ZR.Model.System.Dto
|
||||
{
|
||||
public class ArticleQueryDto: PagerInfo
|
||||
public class ArticleQueryDto : PagerInfo
|
||||
{
|
||||
public string Status { get; set; }
|
||||
public string Title { get; set; }
|
||||
@@ -12,4 +13,41 @@ namespace ZR.Model.System.Dto
|
||||
public DateTime EndTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 输入输出对象
|
||||
/// </summary>
|
||||
public class ArticleDto
|
||||
{
|
||||
[Required(ErrorMessage = "Cid不能为空")]
|
||||
public int Cid { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
public string Content { get; set; }
|
||||
|
||||
public long? UserId { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public string FmtType { get; set; }
|
||||
|
||||
public string Tags { get; set; }
|
||||
|
||||
public int? Hits { get; set; }
|
||||
|
||||
public int? CategoryId { get; set; }
|
||||
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
|
||||
public string AuthorName { get; set; }
|
||||
|
||||
public string CoverUrl { get; set; }
|
||||
|
||||
public ArticleCategory ArticleCategoryNav { get; set; }
|
||||
public string[] TagList { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user