You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
595 B
21 lines
595 B
5 months ago
|
using System;
|
||
|
using Jellyfin.Data.Entities;
|
||
|
using Microsoft.EntityFrameworkCore;
|
||
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||
|
|
||
|
namespace Jellyfin.Server.Implementations.ModelConfiguration;
|
||
|
|
||
|
/// <summary>
|
||
|
/// AncestorId configuration.
|
||
|
/// </summary>
|
||
|
public class AncestorIdConfiguration : IEntityTypeConfiguration<AncestorId>
|
||
|
{
|
||
|
/// <inheritdoc/>
|
||
|
public void Configure(EntityTypeBuilder<AncestorId> builder)
|
||
|
{
|
||
|
builder.HasKey(e => new { e.ItemId, e.Id });
|
||
|
builder.HasIndex(e => e.Id);
|
||
|
builder.HasIndex(e => new { e.ItemId, e.AncestorIdText });
|
||
|
}
|
||
|
}
|