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>
|
|
|
|
|
/// People configuration.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class PeopleConfiguration : IEntityTypeConfiguration<People>
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
public void Configure(EntityTypeBuilder<People> builder)
|
|
|
|
|
{
|
2024-10-11 11:11:15 +00:00
|
|
|
builder.HasKey(e => e.Id);
|
2024-09-08 16:56:14 +00:00
|
|
|
builder.HasIndex(e => e.Name);
|
2024-10-11 11:11:15 +00:00
|
|
|
builder.HasMany(e => e.BaseItems);
|
2024-09-08 16:56:14 +00:00
|
|
|
}
|
|
|
|
|
}
|