Jacob Schmidt 0d77300c22 feat: Project Journal backend monorepo
Monorepo with centralized build props, npm workspaces, LlamaSharp AI,
SQLite/SQLCipher storage, Svelte frontend, and unified smoke tests.

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-03-02 20:56:26 -06:00

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));
}
}