社区板块添加点赞功能

This commit is contained in:
橙子
2022-11-29 23:03:10 +08:00
parent 9a34e63d5f
commit a2ca897fca
11 changed files with 133 additions and 84 deletions

View File

@@ -14,6 +14,7 @@ namespace Yi.Framework.Model.Models
public ArticleEntity()
{
this.CreateTime = DateTime.Now;
this.AgreeNum = 0;
}
[JsonConverter(typeof(ValueToStringConverter))]
[SugarColumn(ColumnName="Id" ,IsPrimaryKey = true )]
@@ -22,12 +23,12 @@ namespace Yi.Framework.Model.Models
/// 文章标题
///</summary>
[SugarColumn(ColumnName="Title" )]
public string Title { get; set; }
public string? Title { get; set; }
/// <summary>
/// 文章内容
///</summary>
[SugarColumn(ColumnName="Content" )]
public string Content { get; set; }
public string? Content { get; set; }
/// <summary>
/// 用户id
///</summary>
@@ -72,16 +73,16 @@ namespace Yi.Framework.Model.Models
/// 描述
///</summary>
[SugarColumn(ColumnName="Remark" )]
public string Remark { get; set; }
public string? Remark { get; set; }
/// <summary>
/// 图片列表
///</summary>
[SugarColumn(ColumnName="Images" )]
public string Images { get; set; }
[SugarColumn(ColumnName = "Images", IsJson = true)]
public List<string>? Images { get; set; }
/// <summary>
/// 点赞数量
///</summary>
[SugarColumn(ColumnName="AgreeNum" )]
public int? AgreeNum { get; set; }
public int AgreeNum { get; set; }
}
}