From 10a2a316a4da8962126d59ee422be3b8dd8c0cc1 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sun, 20 Oct 2024 10:11:24 +0000 Subject: i have too much time. Refactored BaseItem and UserData relation --- Jellyfin.Data/Entities/BaseItemEntity.cs | 2 -- Jellyfin.Data/Entities/UserData.cs | 21 +++++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'Jellyfin.Data') diff --git a/Jellyfin.Data/Entities/BaseItemEntity.cs b/Jellyfin.Data/Entities/BaseItemEntity.cs index a9f9b1793..8a6fb16a1 100644 --- a/Jellyfin.Data/Entities/BaseItemEntity.cs +++ b/Jellyfin.Data/Entities/BaseItemEntity.cs @@ -110,8 +110,6 @@ public class BaseItemEntity public string? SeriesName { get; set; } - public string? UserDataKey { get; set; } - public string? SeasonName { get; set; } public string? ExternalSeriesId { get; set; } diff --git a/Jellyfin.Data/Entities/UserData.cs b/Jellyfin.Data/Entities/UserData.cs index 1204446d0..fe8c8c5ce 100644 --- a/Jellyfin.Data/Entities/UserData.cs +++ b/Jellyfin.Data/Entities/UserData.cs @@ -8,12 +8,6 @@ namespace Jellyfin.Data.Entities; /// public class UserData { - /// - /// Gets or sets the key. - /// - /// The key. - public required string Key { get; set; } - /// /// Gets or sets the users 0-10 rating. /// @@ -69,13 +63,24 @@ public class UserData /// null if [likes] contains no value, true if [likes]; otherwise, false. public bool? Likes { get; set; } + /// + /// Gets or sets the key. + /// + /// The key. + public required Guid ItemId { get; set; } + + /// + /// Gets or Sets the BaseItem. + /// + public required BaseItemEntity? Item { get; set; } + /// /// Gets or Sets the UserId. /// - public Guid UserId { get; set; } + public required Guid UserId { get; set; } /// /// Gets or Sets the User. /// - public User? User { get; set; } + public required User? User { get; set; } } -- cgit v1.2.3