2023-05-20 00:04:45 +02:00
|
|
|
|
using System;
|
2023-06-24 00:15:54 +02:00
|
|
|
|
using System.Collections.Generic;
|
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
|
|
|
|
|
{
|
2023-06-01 15:55:15 +02:00
|
|
|
|
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;
|
2023-06-24 00:15:54 +02:00
|
|
|
|
public HashSet<SyndicationModel> Syndications { get; set; } = new HashSet<SyndicationModel>();
|
2023-05-20 00:04:45 +02:00
|
|
|
|
}
|
|
|
|
|
}
|