Table of Contents

Class MenuItem

Namespace
JJConsulting.Infinity.Domain.Menu
Assembly
JJConsulting.Infinity.Domain.dll

Represents an abstract base class for menu items used in the domain model.

[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
[JsonDerivedType(typeof(FolderMenuItem), "folder")]
[JsonDerivedType(typeof(UrlMenuItem), "url")]
public abstract class MenuItem

Inheritance

Derived

Inherited Members

Remarks

This class serves as a foundation for derived types of menu items, such as folder or URL-based menu items. It uses polymorphism for serialization and deserialization, distinguishing derived types based on a discriminator property.

Properties

Icon

public int? Icon { get; init; }

Property Value

int?

Id

[JsonRequired]
public required Guid Id { get; init; }

Property Value

Guid

Name

[JsonRequired]
public required string Name { get; init; }

Property Value

string

NewUntil

public DateTime? NewUntil { get; init; }

Property Value

DateTime?

Order

public int Order { get; init; }

Property Value

int

Roles

public List<string> Roles { get; init; }

Property Value

List<string>

Users

public List<Guid> Users { get; init; }

Property Value

List<Guid>