diff options
| author | JPVenson <6794763+JPVenson@users.noreply.github.com> | 2024-10-08 13:18:48 +0000 |
|---|---|---|
| committer | JPVenson <6794763+JPVenson@users.noreply.github.com> | 2024-10-08 13:18:48 +0000 |
| commit | d5409a26ea9eb8b7e149c62b6a1a9293726f4be2 (patch) | |
| tree | 13d2d75f027bb522201fa8008ab421e55330d8f7 /Jellyfin.Server.Implementations/ModelConfiguration | |
| parent | 6c819fe516ba742f1dcc77d61f6eedbe987cd692 (diff) | |
WIP Search refactoring and Provider ID refactoring
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration')
| -rw-r--r-- | Jellyfin.Server.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs new file mode 100644 index 000000000..f34837c57 --- /dev/null +++ b/Jellyfin.Server.Implementations/ModelConfiguration/BaseItemProviderConfiguration.cs @@ -0,0 +1,20 @@ +using System; +using Jellyfin.Data.Entities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace Jellyfin.Server.Implementations.ModelConfiguration; + +/// <summary> +/// BaseItemProvider configuration. +/// </summary> +public class BaseItemProviderConfiguration : IEntityTypeConfiguration<BaseItemProvider> +{ + /// <inheritdoc/> + public void Configure(EntityTypeBuilder<BaseItemProvider> builder) + { + builder.HasNoKey(); + builder.HasOne(e => e.Item); + builder.HasIndex(e => new { e.ProviderId, e.ProviderValue, e.ItemId }); + } +} |
