aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server.Implementations/ModelConfiguration/ChapterConfiguration.cs
blob: 0e7c88931a73e49861798423f011e1a04043a268 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 });
    }
}