using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Jellyfin.Data.Entities
{
///
/// An entity that represents a user's custom display preferences for a specific item.
///
public class CustomItemDisplayPreferences
{
///
/// Initializes a new instance of the class.
///
/// The user id.
/// The item id.
/// The client.
/// The preference key.
/// The preference value.
public CustomItemDisplayPreferences(Guid userId, Guid itemId, string client, string preferenceKey, string preferenceValue)
{
UserId = userId;
ItemId = itemId;
Client = client;
Key = preferenceKey;
Value = preferenceValue;
}
///
/// Initializes a new instance of the class.
///
protected CustomItemDisplayPreferences()
{
}
///
/// Gets or sets the Id.
///
///
/// Required.
///
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
///
/// Gets or sets the user Id.
///
///
/// Required.
///
public Guid UserId { get; set; }
///
/// Gets or sets the id of the associated item.
///
///
/// Required.
///
public Guid ItemId { get; set; }
///
/// Gets or sets the client string.
///
///
/// Required. Max Length = 32.
///
[Required]
[MaxLength(32)]
[StringLength(32)]
public string Client { get; set; }
///
/// Gets or sets the preference key.
///
///
/// Required.
///
[Required]
public string Key { get; set; }
///
/// Gets or sets the preference value.
///
///
/// Required.
///
[Required]
public string Value { get; set; }
}
}