Toolhub / Models /Tag.cs
unifare
Initial commit: ToolHub ASP.NET Core app
5fc700d
using FreeSql.DataAnnotations;
namespace ToolHub.Models;
[Table(Name = "Tags")]
public class Tag
{
[Column(IsIdentity = true, IsPrimary = true)]
public int Id { get; set; }
[Column(StringLength = 50)]
public string Name { get; set; } = string.Empty;
[Column(StringLength = 20)]
public string? Color { get; set; }
public bool IsActive { get; set; } = true;
public DateTime CreatedAt { get; set; } = DateTime.Now;
// 导航属性
[Navigate(nameof(ToolTag.TagId))]
public List<ToolTag> ToolTags { get; set; } = new();
}