- 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>
16 lines
633 B
C#
16 lines
633 B
C#
using Journal.Core.Models;
|
|
|
|
namespace Journal.Core.Repositories;
|
|
|
|
public interface IFragmentRepository
|
|
{
|
|
Task<List<Fragment>> GetAllAsync();
|
|
Task<Fragment?> GetByIdAsync(Guid id);
|
|
Task AddAsync(Fragment fragment);
|
|
Task<bool> RemoveAsync(Guid id);
|
|
Task<bool> UpdateAsync(Guid id, string? type = null, string? description = null, IEnumerable<string>? tags = null, DateTimeOffset? time = null);
|
|
Task<List<Fragment>> GetByTagAsync(string tag);
|
|
Task<List<Fragment>> GetByTypeAsync(string type);
|
|
Task<List<Fragment>> SearchAsync(string? type = null, string? tag = null, DateTimeOffset? timeAfter = null);
|
|
}
|