feat: song likes and initial implementation of Spotify playlist support, refs #9
This commit is contained in:
30
song_of_the_day/Data/SmartPlaylistDefinition.cs
Normal file
30
song_of_the_day/Data/SmartPlaylistDefinition.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
[PrimaryKey(nameof(Id))]
|
||||
public class SmartPlaylistDefinition
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Title { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public User? CreatedBy { get; set; }
|
||||
public bool IncludesUnCategorizedSongs { get; set; }
|
||||
public bool IncludesLikedSongs { get; set; }
|
||||
public List<SuggestionHelper>? Categories { get; set; }
|
||||
public string? SpotifyPlaylistId { get; set; }
|
||||
|
||||
public List<Song>? ExplicitlyIncludedSongs { get; set; }
|
||||
public List<Song>? ExplicitlyExcludedSongs { get; set; }
|
||||
|
||||
public bool IsThisUsersLikedSongsPlaylist
|
||||
{
|
||||
get
|
||||
{
|
||||
return IncludesLikedSongs == true
|
||||
&& IncludesUnCategorizedSongs == false
|
||||
&& (ExplicitlyExcludedSongs == null || ExplicitlyExcludedSongs.Count == 0)
|
||||
&& (ExplicitlyIncludedSongs == null || ExplicitlyIncludedSongs.Count == 0)
|
||||
&& (Categories == null || Categories.Count == 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user