SharpRSS/SharpRss/Models/CategoryModel.cs
2023-06-16 22:53:26 +02:00

32 lines
856 B
C#

using System;
using ToolQit;
using ToolQit.Extensions;
namespace SharpRss.Models
{
public class CategoryModel
{
public CategoryModel()
{
Id = Guid.NewGuid().ToString();
}
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 string Icon { get; set; } = string.Empty;
public DateTimeOffset LastUpdated { get; set; } = DateTimeOffset.Now;
public int SyndicationCount { get; set; }
}
}