codeFirst实体建表

This commit is contained in:
不做码农
2023-06-07 22:28:06 +08:00
parent 628df80df7
commit b96edfdac7
47 changed files with 688 additions and 194 deletions

View File

@@ -8,18 +8,20 @@ namespace ZR.Model.System
/// <summary>
/// 文章目录
/// </summary>
[SugarTable("articleCategory")]
[SugarTable("articleCategory", "文章目录")]
[Tenant("0")]
public class ArticleCategory
{
/// <summary>
/// 目录id
/// </summary>
[SugarColumn(IsPrimaryKey = true, ColumnName = "Category_id")]
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "category_id")]
public int CategoryId { get; set; }
[SugarColumn(ColumnDescription = "目录名", Length = 20, ExtendedAttribute = ProteryConstant.NOTNULL)]
public string Name { get; set; }
public int ParentId { get; set; }
[SugarColumn(ColumnName = "create_time", IsNullable = true)]
public int? ParentId { get; set; }
[SugarColumn(ColumnDescription = "创建时间", ColumnName = "create_time")]
public DateTime? CreateTime { get; set; }
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]