30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
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);
|
|
}
|
|
}
|
|
|
|
} |