using System.ComponentModel.DataAnnotations.Schema;

namespace PlaylistShared.Data.Entities;

public class PlaylistTrack
{
    public Guid Id { get; set; }
    public Guid PlaylistId { get; set; }
    public SharedPlaylist Playlist { get; set; } = null!;

    public string YandexTrackId { get; set; } = null!;
    public string Title { get; set; } = null!;
    public string? Artist { get; set; }
    public string? AlbumTitle { get; set; }
    public int DurationMs { get; set; }

    public string? AddedByUserId { get; set; }

    [ForeignKey(nameof(AddedByUserId))]
    public ApplicationUser? AddedByUser { get; set; }

    public DateTime AddedAt { get; set; }
}