diff options
| author | JPVenson <github@jpb.email> | 2024-10-11 11:11:15 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.email> | 2024-10-11 11:11:15 +0000 |
| commit | b73985e04f76924ec91692890687461bcfdb4e11 (patch) | |
| tree | 4b309b212d86e03e9d74d9a2025a520018d7eb7f /Jellyfin.Server.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs | |
| parent | f397fc5b98468a370fb51696df608dfbb2f14213 (diff) | |
Expanded People architecture and fixed migration
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs new file mode 100644 index 000000000..cdaee9161 --- /dev/null +++ b/Jellyfin.Server.Implementations/ModelConfiguration/PeopleBaseItemMapConfiguration.cs @@ -0,0 +1,22 @@ +using System; +using Jellyfin.Data.Entities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace Jellyfin.Server.Implementations.ModelConfiguration; + +/// <summary> +/// People configuration. +/// </summary> +public class PeopleBaseItemMapConfiguration : IEntityTypeConfiguration<PeopleBaseItemMap> +{ + /// <inheritdoc/> + public void Configure(EntityTypeBuilder<PeopleBaseItemMap> builder) + { + builder.HasKey(e => new { e.ItemId, e.PeopleId }); + builder.HasIndex(e => new { e.ItemId, e.SortOrder }); + builder.HasIndex(e => new { e.ItemId, e.ListOrder }); + builder.HasOne(e => e.Item); + builder.HasOne(e => e.People); + } +} |
