Refactor code structure for improved readability and maintainability
This commit is contained in:
parent
b47641feaa
commit
4f488bae45
78 changed files with 3309 additions and 1570 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue