mirror of
https://github.com/hmaxnl/SharpRSS.git
synced 2024-09-20 10:04:21 +02:00
36 lines
922 B
C#
36 lines
922 B
C#
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;
|
|
}
|
|
}
|