44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace BLAIzor.Models
|
|
{
|
|
|
|
public class MenuItem
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
public string? Slug { get; set; }
|
|
|
|
//public int PointId { get; set; }
|
|
public int SortOrder { get; set; }
|
|
|
|
public bool ShowInMainMenu { get; set; } = false;
|
|
|
|
public string? StoredHtml { get; set; }
|
|
|
|
//public Guid? QdrantPointId { get; set; }
|
|
|
|
[ForeignKey("ContentGroup")]
|
|
public int? ContentGroupId { get; set; } // optional link to a ContentGroup
|
|
public ContentGroup? ContentGroup { get; set; }
|
|
|
|
public int? ContentItemId { get; set; } // optional link to a specific ContentItem
|
|
public ContentItem? ContentItem { get; set; }
|
|
|
|
[ForeignKey("SiteInfo")]
|
|
public int SiteInfoId { get; set; }
|
|
public SiteInfo SiteInfo { get; set; } = null!;
|
|
|
|
[ForeignKey("MenuItem")]
|
|
public int? ParentId { get; set; }
|
|
public MenuItem? Parent { get; set; }
|
|
public ICollection<MenuItem> Children { get; set; } = new List<MenuItem>();
|
|
}
|
|
|
|
}
|