journal/Journal.Core/Repositories/IFragmentRepository.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

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