- Wire up lists and todos to C# backend with full CRUD persistence - Add models, DTOs, repositories, and services for lists and todo lists/items - Preserve SQLite DB across vault rebuild/load cycles - Add session store for vault password persistence across navigation - Add inline name input for creating lists and todo lists in SidePanel - Clear editor panel on section change with empty state placeholder - Default markdown editor to preview mode on item selection - Decompose EditorPanel into sub-components: - editor/FragmentEditor, editor/TodoEditor, editor/MarkdownEditor - Shared markdown utilities in utils/markdown.ts - Strip verbose console/eprintln logging from frontend and Tauri backend - Add graceful shutdown with vault persistence on window close Co-Authored-By: Oz <oz-agent@warp.dev>
35 lines
816 B
C#
35 lines
816 B
C#
namespace Journal.Core.Models;
|
|
|
|
public class TodoList
|
|
{
|
|
public Guid Id { get; }
|
|
public string Label { get; set; }
|
|
public DateTimeOffset CreatedAt { get; set; }
|
|
|
|
public TodoList(string label)
|
|
{
|
|
Validate(label);
|
|
|
|
Id = Guid.NewGuid();
|
|
Label = label.Trim();
|
|
CreatedAt = DateTimeOffset.Now;
|
|
}
|
|
|
|
public TodoList(Guid id, string label, DateTimeOffset createdAt)
|
|
{
|
|
if (id == Guid.Empty)
|
|
throw new ArgumentException("Id is required", nameof(id));
|
|
Validate(label);
|
|
|
|
Id = id;
|
|
Label = label.Trim();
|
|
CreatedAt = createdAt;
|
|
}
|
|
|
|
private static void Validate(string label)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(label))
|
|
throw new ArgumentException("Label is required", nameof(label));
|
|
}
|
|
}
|