syntax = "proto3";

package music;

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

// Track message represents a track
message Track {
  // Track ID
  int32 track_id = 1;

  // Track title
  string title = 2;

  // Artist ID
  int32 artist_id = 3;

  // Album ID (optional)
  optional int32 album_id = 4;

  // Duration in seconds
  int32 duration = 5;

  // Track URL
  string url = 6;

  // Source platform
  string source = 7;

  // Track image URL
  string image_url = 8;

  // Genre IDs (multiple genres supported)
  repeated int32 genre_ids = 9;
}

// TrackGenre message represents the many-to-many relationship between tracks and genres
message TrackGenre {
  // Track ID
  int32 track_id = 1;

  // Genre ID
  int32 genre_id = 2;

  // Created timestamp (Unix seconds)
  int64 created_at = 3;
}
