< Summary - Jellyfin

Information
Class: Jellyfin.Data.Entities.CustomItemDisplayPreferences
Assembly: Jellyfin.Data
File(s): /srv/git/jellyfin/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 80
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%

File(s)

/srv/git/jellyfin/Jellyfin.Data/Entities/CustomItemDisplayPreferences.cs

#LineLine coverage
 1using System;
 2using System.ComponentModel.DataAnnotations;
 3using System.ComponentModel.DataAnnotations.Schema;
 4
 5namespace Jellyfin.Data.Entities
 6{
 7    /// <summary>
 8    /// An entity that represents a user's custom display preferences for a specific item.
 9    /// </summary>
 10    public class CustomItemDisplayPreferences
 11    {
 12        /// <summary>
 13        /// Initializes a new instance of the <see cref="CustomItemDisplayPreferences"/> class.
 14        /// </summary>
 15        /// <param name="userId">The user id.</param>
 16        /// <param name="itemId">The item id.</param>
 17        /// <param name="client">The client.</param>
 18        /// <param name="key">The preference key.</param>
 19        /// <param name="value">The preference value.</param>
 20        public CustomItemDisplayPreferences(Guid userId, Guid itemId, string client, string key, string? value)
 21        {
 022            UserId = userId;
 023            ItemId = itemId;
 024            Client = client;
 025            Key = key;
 026            Value = value;
 027        }
 28
 29        /// <summary>
 30        /// Gets the Id.
 31        /// </summary>
 32        /// <remarks>
 33        /// Required.
 34        /// </remarks>
 35        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 36        public int Id { get; private set; }
 37
 38        /// <summary>
 39        /// Gets or sets the user Id.
 40        /// </summary>
 41        /// <remarks>
 42        /// Required.
 43        /// </remarks>
 44        public Guid UserId { get; set; }
 45
 46        /// <summary>
 47        /// Gets or sets the id of the associated item.
 48        /// </summary>
 49        /// <remarks>
 50        /// Required.
 51        /// </remarks>
 52        public Guid ItemId { get; set; }
 53
 54        /// <summary>
 55        /// Gets or sets the client string.
 56        /// </summary>
 57        /// <remarks>
 58        /// Required. Max Length = 32.
 59        /// </remarks>
 60        [MaxLength(32)]
 61        [StringLength(32)]
 62        public string Client { get; set; }
 63
 64        /// <summary>
 65        /// Gets or sets the preference key.
 66        /// </summary>
 67        /// <remarks>
 68        /// Required.
 69        /// </remarks>
 70        public string Key { get; set; }
 71
 72        /// <summary>
 73        /// Gets or sets the preference value.
 74        /// </summary>
 75        /// <remarks>
 76        /// Required.
 77        /// </remarks>
 78        public string? Value { get; set; }
 79    }
 80}