Record a listening-history entry when a stream ticket is issued and expose GET /users/{id}/listening-history to read it back.
28 lines
748 B
C#
28 lines
748 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Musify.Domain.Entities;
|
|
|
|
namespace Musify.Application.Contracts
|
|
{
|
|
public interface IDatabase
|
|
{
|
|
DbSet<User> Users { get; }
|
|
|
|
DbSet<PlayList> PlayLists { get; }
|
|
|
|
DbSet<Track> Tracks { get; }
|
|
|
|
DbSet<UserHasTrack> UserHasTracks { get; }
|
|
|
|
DbSet<PlayListHasTrack> PlayListHasTracks { get; }
|
|
|
|
DbSet<Upload> Uploads { get; }
|
|
|
|
DbSet<UploadIntent> UploadIntents { get; }
|
|
|
|
DbSet<ListeningHistory> ListeningHistories { get; }
|
|
|
|
Task<IDatabaseTransaction> BeginTransactionAsync(System.Data.IsolationLevel isolationLevel, CancellationToken cancellationToken);
|
|
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken);
|
|
}
|
|
} |