using System; namespace SharpRss.Models { /// /// To store and load data from file/database /// public class CategoryModel { public CategoryModel() { HexColor = $"#{_random.Next(0x1000000):X6}"; CategoryId = Guid.NewGuid().ToString(); } private readonly Random _random = new Random(); public static CategoryModel Create(string categoryName, string hexColor, string id) { CategoryModel catModel = new CategoryModel() { Name = categoryName, HexColor = hexColor, CategoryId = id }; return catModel; } public string Name { get; set; } public string HexColor { get; set; } public string PathIcon { get; set; } public string CategoryId { get; private set; } } }