using SqlSugar;
namespace MyHomePage.Api.Models.Entities;
/// 分类(二级树形,ParentId 为 0 表示一级)
[SugarTable("categories")]
public class Category : BaseEntity
{
/// 父分类 ID;一级分类为 0
[SugarColumn(DefaultValue = "0")]
public int ParentId { get; set; }
/// 分类名称
[SugarColumn(Length = 64, IsNullable = false)]
public string Name { get; set; } = string.Empty;
/// lucide 图标名
[SugarColumn(Length = 64, IsNullable = true)]
public string? Icon { get; set; }
/// 排序值,越小越靠前
[SugarColumn(DefaultValue = "0")]
public int Sort { get; set; }
}