aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Entities/UserData.cs
blob: b9aea664aab895547834d14a6957b95ae4c2f754 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Jellyfin.Data.Entities;

#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
public class UserData
{
    /// <summary>
    /// Gets or sets the key.
    /// </summary>
    /// <value>The key.</value>
    public required string Key { get; set; }

    /// <summary>
    /// Gets or sets the users 0-10 rating.
    /// </summary>
    /// <value>The rating.</value>
    public double? Rating { get; set; }

    /// <summary>
    /// Gets or sets the playback position ticks.
    /// </summary>
    /// <value>The playback position ticks.</value>
    public long PlaybackPositionTicks { get; set; }

    /// <summary>
    /// Gets or sets the play count.
    /// </summary>
    /// <value>The play count.</value>
    public int PlayCount { get; set; }

    /// <summary>
    /// Gets or sets a value indicating whether this instance is favorite.
    /// </summary>
    /// <value><c>true</c> if this instance is favorite; otherwise, <c>false</c>.</value>
    public bool IsFavorite { get; set; }

    /// <summary>
    /// Gets or sets the last played date.
    /// </summary>
    /// <value>The last played date.</value>
    public DateTime? LastPlayedDate { get; set; }

    /// <summary>
    /// Gets or sets a value indicating whether this <see cref="UserData" /> is played.
    /// </summary>
    /// <value><c>true</c> if played; otherwise, <c>false</c>.</value>
    public bool Played { get; set; }

    /// <summary>
    /// Gets or sets the index of the audio stream.
    /// </summary>
    /// <value>The index of the audio stream.</value>
    public int? AudioStreamIndex { get; set; }

    /// <summary>
    /// Gets or sets the index of the subtitle stream.
    /// </summary>
    /// <value>The index of the subtitle stream.</value>
    public int? SubtitleStreamIndex { get; set; }

    /// <summary>
    /// Gets or sets a value indicating whether the item is liked or not.
    /// This should never be serialized.
    /// </summary>
    /// <value><c>null</c> if [likes] contains no value, <c>true</c> if [likes]; otherwise, <c>false</c>.</value>
    public bool? Likes { get; set; }

    public Guid UserId { get; set; }

    public User? User { get; set; }
}