Separate responsibilities: start-listening command, API-side JSON converters, bulk track endpoints, mix kinds

This commit is contained in:
2026-09-24 12:14:53 +02:00
parent 75d0c0817e
commit 0fa033faff
64 changed files with 2903 additions and 651 deletions
+2 -5
View File
@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Musify.Domain.ValueObjects;
using System.ComponentModel.DataAnnotations.Schema;
using Musify.Domain.Abstractions;
@@ -13,11 +14,7 @@ public class Mix : IAuditable
public required long UserId { get; set; }
[MaxLength(100)]
public required string Title { get; set; }
[MaxLength(256)]
public string? Subtitle { get; set; }
public MixKind Kind { get; set; }
public int Position { get; set; }
@@ -36,8 +36,6 @@ public class Track : IAuditable, IHasLifeCycle, IOwnedEntity
public TrackAudio Audio { get; set; } = new();
public ICollection<UserHasTrack> UserTracks { get; set; } = new List<UserHasTrack>();
public ICollection<PlayListHasTrack> PlayListTracks { get; set; } = new List<PlayListHasTrack>();
public ICollection<AlbumHasTrack> AlbumTracks { get; set; } = new List<AlbumHasTrack>();
@@ -30,8 +30,6 @@ public class User : IAuditable
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
public ICollection<UserHasTrack> UserTracks { get; set; } = new List<UserHasTrack>();
public ICollection<PlayList> PlayLists { get; set; } = new List<PlayList>();
public ICollection<ListeningHistory> ListeningHistories { get; set; } = new List<ListeningHistory>();
@@ -1,19 +0,0 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Musify.Domain.Entities;
[Table("UserHasTrack")]
public class UserHasTrack
{
public Guid Id { get; set; } = Guid.NewGuid();
public required long UserId { get; set; }
public required Guid TrackId { get; set; }
[ForeignKey(nameof(UserId))]
public User User { get; set; } = null!;
[ForeignKey(nameof(TrackId))]
public Track Track { get; set; } = null!;
}
@@ -0,0 +1,7 @@
namespace Musify.Domain.ValueObjects;
public enum MixKind
{
Discovery = 0,
Daily = 1
}