35 lines
923 B
C#
35 lines
923 B
C#
using System.Collections.Generic;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace BeWoPlanerMobil.Util
|
|
{
|
|
public class BootstrapTreeViewItem
|
|
{
|
|
[JsonProperty("selectable")]
|
|
public bool Selectable { get; set; }
|
|
|
|
[JsonProperty("text")]
|
|
public string Text { get; set; }
|
|
|
|
[JsonProperty("tags")]
|
|
public List<string> Tags { get; set; }
|
|
|
|
[JsonProperty("nodes")]
|
|
public List<BootstrapTreeViewItem> Nodes { get; set; } = new List<BootstrapTreeViewItem>();
|
|
|
|
[JsonIgnore]
|
|
public long Oid { get; }
|
|
|
|
[JsonIgnore]
|
|
public long? ParentOid { get; set; }
|
|
|
|
public BootstrapTreeViewItem(string text, long? parentOid, long oid, bool isParent)
|
|
{
|
|
Text = text;
|
|
Tags = new List<string> { oid.ToString() };
|
|
ParentOid = parentOid;
|
|
Oid = oid;
|
|
Selectable = !isParent;
|
|
}
|
|
}
|
|
} |