aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/ItemValuesMapConfiguration.cs
blob: 9c22b114c71b4b0b515e006f89dc05a321605948 (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>
/// itemvalues Configuration.
/// </summary>
public class ItemValuesMapConfiguration : IEntityTypeConfiguration<ItemValueMap>
{
    /// <inheritdoc/>
    public void Configure(EntityTypeBuilder<ItemValueMap> builder)
    {
        builder.HasKey(e => new { e.ItemValueId, e.ItemId });
        builder.HasOne(e => e.Item);
        builder.HasOne(e => e.ItemValue);
    }
}