namespace MyWebLog.Data; /// /// A category under which a post may be identfied /// public class Category { /// /// The ID of the category /// public string Id { get; set; } = ""; /// /// The displayed name /// public string Name { get; set; } = ""; /// /// The slug (used in category URLs) /// public string Slug { get; set; } = ""; /// /// A longer description of the category /// public string? Description { get; set; } = null; /// /// The parent ID of this category (if a subcategory) /// public string? ParentId { get; set; } = null; /// /// The parent of this category (if a subcategory) /// public Category? Parent { get; set; } = default; /// /// The posts assigned to this category /// public ICollection Posts { get; set; } = default!; }