From 44dfe554a894561d3878c8f204d989e4d5a72d72 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Thu, 20 Feb 2025 09:55:02 +0000 Subject: Moved Database projects under /src removed old pgsql references --- .../ModelConfiguration/ChapterConfiguration.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs (limited to 'src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs') diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs new file mode 100644 index 000000000..5a84f7750 --- /dev/null +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ChapterConfiguration.cs @@ -0,0 +1,19 @@ +using System; +using Jellyfin.Data.Entities; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace Jellyfin.Server.Implementations.ModelConfiguration; + +/// +/// Chapter configuration. +/// +public class ChapterConfiguration : IEntityTypeConfiguration +{ + /// + public void Configure(EntityTypeBuilder builder) + { + builder.HasKey(e => new { e.ItemId, e.ChapterIndex }); + builder.HasOne(e => e.Item); + } +} -- cgit v1.2.3