diff options
| author | JPVenson <JPVenson@users.noreply.github.com> | 2024-09-08 16:56:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-08 16:56:14 +0000 |
| commit | ee1bdf4e222125ed7382165fd7e09599ca4bd4aa (patch) | |
| tree | 78b1e180c2626ccfc483f8bff9ec861079a6d8e6 /Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs | |
| parent | d0b4b2ddb31a54f0705303ab8461be1125d66eab (diff) | |
WIP move baseitem to jellyfin.db
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs new file mode 100644 index 000000000..0e7c88931 --- /dev/null +++ b/Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.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> +/// Chapter configuration. +/// </summary> +public class ChapterConfiguration : IEntityTypeConfiguration<Chapter> +{ + /// <inheritdoc/> + public void Configure(EntityTypeBuilder<Chapter> builder) + { + builder.HasNoKey(); + builder.HasIndex(e => new { e.ItemId, e.ChapterIndex }); + } +} |
