Sidebar folders get their own table rather than a flag on lists, so the places that enumerate lists (MCP tools, move-to-list, queue picker, repo import) need no folder filtering. ON DELETE SET NULL keeps a folder's lists alive when the folder goes.
21 lines
953 B
C#
21 lines
953 B
C#
namespace ClaudeDo.Data.Models;
|
|
|
|
/// <summary>
|
|
/// A sidebar folder grouping user lists. Deliberately its own table rather than a flag on
|
|
/// <see cref="ListEntity"/>: every place that enumerates lists (MCP list_task_lists, "move to
|
|
/// list", the queue picker, repo import) would otherwise have to filter folders out.
|
|
/// One level only — a folder holds lists, never other folders.
|
|
/// </summary>
|
|
public sealed class ListFolderEntity
|
|
{
|
|
public required string Id { get; init; }
|
|
public required string Name { get; set; }
|
|
public required DateTime CreatedAt { get; init; }
|
|
// Icon key into the UI's icon library, same set as ListEntity.Icon; null = default folder icon.
|
|
public string? Icon { get; set; }
|
|
public int SortOrder { get; set; }
|
|
// Sidebar expand/collapse state. Lives here rather than in ui.config.json because the row is
|
|
// already being read for the folder itself.
|
|
public bool IsCollapsed { get; set; }
|
|
}
|