syntax = "proto3";

package music;

option go_package = "github.com/echofi-ai/schema/v2/types/music";

import "music/track.proto";
import "music/artist.proto";

// Playlist message represents a playlist
message Playlist {
  // Playlist ID
  string playlist_id = 1;

  // Created by user ID
  string created_by = 2;

  // Playlist title
  string title = 3;

  // Playlist description
  string description = 4;

  // Cover image URL (legacy field)
  string cover_image = 5;

  // Image URL (new field)
  string image_url = 6;

  // Is official playlist
  bool is_official = 7;

  // Is public playlist
  bool is_public = 8;

  // Is featured playlist (admin/system only)
  bool is_featured = 9;

  // Creation timestamp (Unix seconds)
  int64 created_at = 10;
}

// PlaylistTrack message represents a track in a playlist
message PlaylistTrack {
  // Entry ID
  int32 entry_id = 1;

  // Playlist ID
  string playlist_id = 2;

  // Track ID
  int32 track_id = 3;

  // Position in playlist
  int32 position = 4;

  // Date added to playlist (Unix seconds)
  int64 added_at = 5;
}

// PlaylistTrackWithDetails message represents a track in a playlist with full track and artist information
message PlaylistTrackWithDetails {
  // Entry ID
  int32 entry_id = 1;

  // Playlist ID
  string playlist_id = 2;

  // Position in playlist
  int32 position = 3;

  // Date added to playlist (Unix seconds)
  int64 added_at = 4;

  // Full track information
  Track track = 5;

  // Full artist information
  Artist artist = 6;
}
