Add navigation property to device entity

This commit is contained in:
Patrick Barron 2021-04-10 16:17:02 -04:00
parent 98e19c9fd3
commit f47fe308b1

View File

@ -26,6 +26,9 @@ namespace Jellyfin.Data.Entities.Security
DateCreated = DateTime.UtcNow;
DateLastActivity = DateCreated;
// Non-nullable for EF Core, as this is a required relationship.
User = null!;
}
public int Id { get; private set; }
@ -77,5 +80,10 @@ namespace Jellyfin.Data.Entities.Security
/// Gets or sets the date of last activity.
/// </summary>
public DateTime DateLastActivity { get; set; }
/// <summary>
/// Gets the user.
/// </summary>
public User User { get; private set; }
}
}