journal/Journal.Core/Dtos/FragmentDtos.cs
Jacob Schmidt d0fac4199a Initial commit: Journal.Core library + Sidecar console app
- Fragment model with validation, DTOs (immutable records), repository, service
- Sidecar stdin/stdout JSON protocol for Tauri integration
- DI wiring via ServiceCollectionExtensions
- Scaffolded Journal.Api (not yet wired)

Co-Authored-By: Warp <agent@warp.dev>
2026-02-21 02:01:00 -06:00

25 lines
568 B
C#

using System.ComponentModel.DataAnnotations;
namespace Journal.Core.Dtos;
public record FragmentDto(
Guid Id,
string Type,
string Description,
DateTimeOffset Time,
List<string> Tags
);
public record CreateFragmentDto(
[property: Required(AllowEmptyStrings = false)] string Type,
[property: Required(AllowEmptyStrings = false)] string Description,
List<string>? Tags = null
);
public record UpdateFragmentDto(
string? Type = null,
string? Description = null,
List<string>? Tags = null,
DateTimeOffset? Time = null
);