// <copyright file="UserPlaybackHistoryView.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>

namespace Jellyfin.Database.Implementations.Entities.Views;

#pragma warning disable CS1591
#pragma warning disable SA1600

using System;

/// <summary>
/// Read-only projection of library."UserPlaybackHistory_v".
/// Per-user watch history with calculated progress percentage.
/// </summary>
public class UserPlaybackHistoryView
{
    public string? Username { get; set; }

    public Guid? UserId { get; set; }

    public string? ItemName { get; set; }

    public string? ItemType { get; set; }

    public string? SeriesName { get; set; }

    public string? SeasonName { get; set; }

    public int? EpisodeNumber { get; set; }

    public int? SeasonNumber { get; set; }

    public int? ProductionYear { get; set; }

    public long? RunTimeTicks { get; set; }

    public Guid? ItemId { get; set; }

    public bool? Played { get; set; }

    public int? PlayCount { get; set; }

    public DateTimeOffset? LastPlayedDate { get; set; }

    public long? PlaybackPositionTicks { get; set; }

    /// <summary>Gets or sets playback progress 0–100. NULL when no runtime.</summary>
    public decimal? ProgressPct { get; set; }

    public bool? IsFavorite { get; set; }

    public double? Rating { get; set; }

    public int? AudioStreamIndex { get; set; }

    public int? SubtitleStreamIndex { get; set; }
}
