SharpRSS/SharpRss/Models/CategoryModel.cs
2023-06-10 20:27:26 +02:00

31 lines
809 B
C#

using System;
using ToolQit;
using ToolQit.Extensions;
namespace SharpRss.Models
{
public class CategoryModel
{
public CategoryModel()
{
Id = Guid.NewGuid().ToString();
}
/*private string _id = string.Empty;*/
public string Id { get; set; }
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;
}
}