diff options
| author | JPVenson <github@jpb.email> | 2024-10-10 14:32:49 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.email> | 2024-10-10 14:32:49 +0000 |
| commit | ee0dad6f432e5bfdda074e3f006f4c4d3c418d08 (patch) | |
| tree | 34bbc0ea11007d9e7cd84f738d7b69cf88073259 /Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs | |
| parent | 3e7ce5e1df9c6820a6dfd4c23aea29eed83b43ba (diff) | |
Refactored ItemValue structure
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs new file mode 100644 index 000000000..9c22b114c --- /dev/null +++ b/Jellyfin.Server.Implementations/ModelConfiguration/ItemValuesMapConfiguration.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> +/// itemvalues Configuration. +/// </summary> +public class ItemValuesMapConfiguration : IEntityTypeConfiguration<ItemValueMap> +{ + /// <inheritdoc/> + public void Configure(EntityTypeBuilder<ItemValueMap> builder) + { + builder.HasKey(e => new { e.ItemValueId, e.ItemId }); + builder.HasOne(e => e.Item); + builder.HasOne(e => e.ItemValue); + } +} |
