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 key, string? value)
        {
            UserId = userId;
            ItemId = itemId;
            Client = client;
            Key = key;
            Value = value;
        }
        /// 
        /// Gets the Id.
        /// 
        /// 
        /// Required.
        /// 
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; private 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.
        /// 
        [MaxLength(32)]
        [StringLength(32)]
        public string Client { get; set; }
        /// 
        /// Gets or sets the preference key.
        /// 
        /// 
        /// Required.
        /// 
        public string Key { get; set; }
        /// 
        /// Gets or sets the preference value.
        /// 
        /// 
        /// Required.
        /// 
        public string? Value { get; set; }
    }
}