SharpRSS/SharpRss/Models/CategoryModel.cs

32 lines
856 B
C#
Raw Normal View History

2023-05-20 00:04:45 +02:00
using System;
2023-05-20 00:35:43 +02:00
using ToolQit;
2023-06-04 19:00:46 +02:00
using ToolQit.Extensions;
2023-05-20 00:04:45 +02:00
namespace SharpRss.Models
{
public class CategoryModel
2023-05-20 00:04:45 +02:00
{
2023-06-10 20:27:26 +02:00
public CategoryModel()
2023-05-20 00:04:45 +02:00
{
2023-06-10 20:27:26 +02:00
Id = Guid.NewGuid().ToString();
2023-05-20 00:04:45 +02:00
}
2023-06-16 22:53:26 +02:00
2023-06-10 20:27:26 +02:00
public string Id { get; set; }
2023-05-21 21:56:37 +02:00
public string Name { get; set; } = string.Empty;
2023-06-04 19:00:46 +02:00
private string _hexColor = string.Empty;
public string HexColor
{
get
{
if (_hexColor.IsNullEmptyWhiteSpace())
_hexColor = Utilities.GenerateRandomHexColor();
return _hexColor;
}
set => _hexColor = value;
}
2023-05-21 21:56:37 +02:00
public string Icon { get; set; } = string.Empty;
2023-06-16 22:53:26 +02:00
public DateTimeOffset LastUpdated { get; set; } = DateTimeOffset.Now;
public int SyndicationCount { get; set; }
2023-05-20 00:04:45 +02:00
}
}