aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs
diff options
context:
space:
mode:
authorJPVenson <JPVenson@users.noreply.github.com>2024-09-08 16:56:14 +0000
committerGitHub <noreply@github.com>2024-09-08 16:56:14 +0000
commitee1bdf4e222125ed7382165fd7e09599ca4bd4aa (patch)
tree78b1e180c2626ccfc483f8bff9ec861079a6d8e6 /Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs
parentd0b4b2ddb31a54f0705303ab8461be1125d66eab (diff)
WIP move baseitem to jellyfin.db
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs')
-rw-r--r--Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs20
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 });
+ }
+}