Files
mixtape/zero.Api/Models/Trees/TreeItem.cs
T

77 lines
1.7 KiB
C#
Raw Normal View History

2021-11-29 18:25:50 +01:00
namespace zero.Api.Models;
2021-11-22 14:29:22 +01:00
/// <summary>
/// Represents an item in a tree
/// </summary>
2021-11-27 16:33:05 +01:00
public struct TreeItem
2021-11-22 14:29:22 +01:00
{
/// <summary>
/// Id of the item
/// </summary>
public string Id { get; set; }
/// <summary>
/// Parent id of the item
/// </summary>
public string ParentId { get; set; }
/// <summary>
/// Sort order
/// </summary>
public uint Sort { get; set; }
/// <summary>
/// Name of the item
/// </summary>
public string Name { get; set; }
/// <summary>
/// Displays a description on hover
/// </summary>
public string Description { get; set; }
/// <summary>
/// Icon to display alongside the name
/// </summary>
public string Icon { get; set; }
/// <summary>
/// Whether this item is open in case it contains children
/// </summary>
public bool IsOpen { get; set; }
/// <summary>
/// Displays a small icon (with hover text) next to the main item icon
/// </summary>
2021-11-27 16:33:05 +01:00
public TreeItemModifier? Modifier { get; set; }
2021-11-22 14:29:22 +01:00
/// <summary>
/// Whether this item has children
/// </summary>
public bool HasChildren { get; set; }
/// <summary>
/// Count of children
/// </summary>
public int ChildCount { get; set; }
/// <summary>
/// Whether this item is published or not
/// </summary>
public bool IsInactive { get; set; }
/// <summary>
/// Whether to display the item icon with a dashed line
/// </summary>
public bool IsDashed { get; set; }
/// <summary>
/// Whether to show actions menu. This will only work when the onActionsRequested cb is implemented in the component
/// </summary>
public bool HasActions { get; set; }
/// <summary>
/// Output an additional count value.
/// </summary>
public int? CountOutput { get; set; }
2021-11-23 15:43:21 +01:00
}