using System; using ToolQit; using ToolQit.Extensions; namespace SharpRss.Models { public class CategoryModel { private string _id = string.Empty; public string Id { get { if (_id.IsNullEmptyWhiteSpace()) _id = Guid.NewGuid().ToString(); return _id; } set => _id = value; } public string Name { get; set; } = string.Empty; private string _hexColor = string.Empty; public string HexColor { get { if (_hexColor.IsNullEmptyWhiteSpace()) _hexColor = Utilities.GenerateRandomHexColor(); return _hexColor; } set => _hexColor = value; } public int FeedCount { get; set; } public string Icon { get; set; } = string.Empty; } }