Add track coauthors with invitations, acceptance and coauthor-aware track responses

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.
This commit is contained in:
2026-09-25 02:14:23 +02:00
parent a888a44b41
commit 03f5936944
29 changed files with 2267 additions and 18 deletions
@@ -15,7 +15,8 @@ namespace Musify.Application.Tracks.Responses
long OwnerUserId,
IReadOnlyCollection<Genre> Tags,
bool IsExplicit,
bool IsPublished)
bool IsPublished,
IReadOnlyList<TrackCoauthorReference> Coauthors)
{
public static TrackApplicationResponse FromEntity(Track track, int listensCount) =>
new(
@@ -30,6 +31,7 @@ namespace Musify.Application.Tracks.Responses
track.OwnerUserId,
track.Tags.Select(tag => tag.Tag).ToList(),
track.IsExplicit,
track.IsPublished);
track.IsPublished,
[]);
}
}