Refactor code structure for improved readability and maintainability

This commit is contained in:
MaddoScientisto 2026-02-21 10:40:12 +01:00
commit 4f488bae45
78 changed files with 3309 additions and 1570 deletions

View file

@ -0,0 +1,17 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using TwitchArchive.Core.Persistence.Models;
namespace TwitchArchive.Core.Persistence
{
public interface ISessionRepository
{
Task<StreamSession> CreateSessionAsync(string username, string streamId, DateTime startedAt, CancellationToken ct = default);
Task EndSessionAsync(long sessionId, DateTime endedAt, string status, CancellationToken ct = default);
Task<ArchiveJob> CreateJobAsync(long sessionId, string jobType, DateTime startedAt, CancellationToken ct = default);
Task UpdateJobAsync(ArchiveJob job, CancellationToken ct = default);
Task<List<StreamSession>> GetRecentSessionsAsync(int max = 50, CancellationToken ct = default);
Task<List<ArchiveJob>> GetJobsForSessionAsync(long sessionId, CancellationToken ct = default);
}
}