feat: add PlaylistRepresentable protocol, conform Playlist

feat/music-streaming
Laurent 1 month ago
parent 87410196af
commit 7024be1cba
  1. 4
      Music/Models/Playlist.swift
  2. 7
      Music/Protocols/PlaylistRepresentable.swift

@ -15,6 +15,10 @@ nonisolated extension Playlist: FetchableRecord, MutablePersistableRecord {
} }
} }
extension Playlist: PlaylistRepresentable {
var isSmartPlaylist: Bool { false }
}
#if DEBUG #if DEBUG
extension Playlist { extension Playlist {
static func fixture( static func fixture(

@ -0,0 +1,7 @@
import Foundation
protocol PlaylistRepresentable: Identifiable, Hashable, Sendable {
var id: Int64? { get }
var name: String { get }
var isSmartPlaylist: Bool { get }
}
Loading…
Cancel
Save