Owners invite existing users to coauthor a track; invitees accept or reject, and either side can remove a coauthor. Only accepted coauthors appear in track responses and in the coauthor's public track list. The owner also receives the full invitation list with statuses on the user tracks response.
46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using ErrorOr;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Musify.Domain.Entities;
|
|
|
|
namespace Musify.Application.Contracts
|
|
{
|
|
public interface IDatabase
|
|
{
|
|
public DbSet<User> Users { get; }
|
|
|
|
public DbSet<PlayList> PlayLists { get; }
|
|
|
|
public DbSet<Album> Albums { get; }
|
|
|
|
public DbSet<AlbumHasTrack> AlbumHasTracks { get; }
|
|
|
|
public DbSet<Track> Tracks { get; }
|
|
|
|
public DbSet<PlayListHasTrack> PlayListHasTracks { get; }
|
|
|
|
public DbSet<Mix> Mixes { get; }
|
|
|
|
public DbSet<MixItem> MixItems { get; }
|
|
|
|
public DbSet<UploadIntent> UploadIntents { get; }
|
|
|
|
public DbSet<ListeningHistory> ListeningHistories { get; }
|
|
|
|
public DbSet<TrackLike> TrackLikes { get; }
|
|
|
|
public DbSet<TrackTag> TrackTags { get; }
|
|
|
|
public DbSet<UserFollow> UserFollows { get; }
|
|
|
|
public DbSet<TrackCoauthor> TrackCoauthors { get; }
|
|
|
|
public Task<IDatabaseTransaction> BeginTransactionAsync(System.Data.IsolationLevel isolationLevel, CancellationToken cancellationToken);
|
|
|
|
public DbSet<TEntity> Set<TEntity>() where TEntity : class;
|
|
|
|
public Task<int> SaveChangesAsync(CancellationToken cancellationToken);
|
|
|
|
public Task<ErrorOr<Success>> TrySaveChangesAsync(Error onUniqueViolation, CancellationToken cancellationToken);
|
|
}
|
|
}
|