AI-Studio/app/MindWork AI Studio/Components/TreeItemData.cs

24 lines
695 B
C#
Raw Normal View History

2024-08-21 06:30:01 +00:00
namespace AIStudio.Components;
public class TreeItemData : ITreeItem
{
public WorkspaceBranch Branch { get; init; } = WorkspaceBranch.NONE;
public int Depth { get; init; }
public string Text { get; init; } = string.Empty;
2024-08-21 06:30:01 +00:00
public string ShortenedText => this.Text.Length > 30 ? this.Text[..30] + "..." : this.Text;
public string Icon { get; init; } = string.Empty;
public TreeItemType Type { get; init; }
public string Path { get; init; } = string.Empty;
public bool Expandable { get; init; } = true;
public DateTimeOffset LastEditTime { get; init; }
2024-07-24 13:17:45 +00:00
public IReadOnlyCollection<TreeItemData<ITreeItem>> Children { get; init; } = [];
}