journal/Journal.Core/Dtos/TodoDtos.cs
Jacob Schmidt c7933aeeec Lists & todos backend, editor refactor, inline create, UX improvements
- 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>
2026-02-26 17:33:27 -06:00

39 lines
747 B
C#

using System.ComponentModel.DataAnnotations;
namespace Journal.Core.Dtos;
public record TodoListDto(
Guid Id,
string Label,
DateTimeOffset CreatedAt,
List<TodoItemDto> Items
);
public record TodoItemDto(
Guid Id,
Guid ListId,
string Text,
bool Done,
int SortOrder
);
public record CreateTodoListDto(
[property: Required(AllowEmptyStrings = false)] string Label
);
public record UpdateTodoListDto(
string? Label = null
);
public record CreateTodoItemDto(
[property: Required] Guid ListId,
[property: Required(AllowEmptyStrings = false)] string Text,
int? SortOrder = null
);
public record UpdateTodoItemDto(
string? Text = null,
bool? Done = null,
int? SortOrder = null
);