2024-09-08 16:56:14 +00:00
|
|
|
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)
|
|
|
|
|
{
|
2024-10-09 11:22:52 +00:00
|
|
|
builder.HasKey(e => new { e.ItemId, e.ChapterIndex });
|
|
|
|
|
builder.HasOne(e => e.Item);
|
2024-09-08 16:56:14 +00:00
|
|
|
}
|
|
|
|
|
}
|