using System.ComponentModel.DataAnnotations; public class DictItem { // 主键 public Guid Uuid { get; set; } = Guid.NewGuid(); // 层级关系 public Guid? ParentId { get; set; } public string? ParentValue { get; set; } // 基础信息 [Required] [StringLength(100)] public string Label { get; set; } = null!; // 中文标签 [StringLength(100)] public string? LabelEn { get; set; } // 英文标签 [StringLength(500)] public string? Remark { get; set; } // 备注 [Required] [StringLength(50)] public string Value { get; set; } = null!; // 字典值 [StringLength(500)] public string? Tag { get; set; } // 逗号分隔的标签 // 审计字段 public DateTime CreateTime { get; set; } = DateTime.UtcNow; public Guid CreateUserId { get; set; } // 导航属性 public DictItem? Parent { get; set; } public ICollection Children { get; set; } = new List(); }