Browse Source

Add id properties for preferences and permissions

Patrick Barron 4 years ago
parent
commit
f1cadb27d9
2 changed files with 11 additions and 0 deletions
  1. 6 0
      Jellyfin.Data/Entities/Permission.cs
  2. 5 0
      Jellyfin.Data/Entities/Preference.cs

+ 6 - 0
Jellyfin.Data/Entities/Permission.cs

@@ -1,5 +1,6 @@
 #pragma warning disable CA1711 // Identifiers should not have incorrect suffix
 
+using System;
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
 using Jellyfin.Data.Enums;
@@ -33,6 +34,11 @@ namespace Jellyfin.Data.Entities
         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
         public int Id { get; private set; }
 
+        /// <summary>
+        /// Gets or sets the id of the associated user.
+        /// </summary>
+        public Guid UserId { get; set; }
+
         /// <summary>
         /// Gets the type of this permission.
         /// </summary>

+ 5 - 0
Jellyfin.Data/Entities/Preference.cs

@@ -32,6 +32,11 @@ namespace Jellyfin.Data.Entities
         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
         public int Id { get; private set; }
 
+        /// <summary>
+        /// Gets or sets the id of the associated user.
+        /// </summary>
+        public Guid UserId { get; set; }
+
         /// <summary>
         /// Gets the type of this preference.
         /// </summary>