blob: 5935b632a7734028097ce0ecd39e1e3cda73717c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
using Jellyfin.Data.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Jellyfin.Database.Implementations.ModelConfiguration;
/// <summary>
/// Chapter configuration.
/// </summary>
public class ChapterConfiguration : IEntityTypeConfiguration<Chapter>
{
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<Chapter> builder)
{
builder.HasKey(e => new { e.ItemId, e.ChapterIndex });
builder.HasOne(e => e.Item);
}
}
|