blob: 3551f768631d19cd2a09901dc67ff9fa5de48303 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
using Jellyfin.Database.Implementations.Entities.Security;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Jellyfin.Database.Implementations.ModelConfiguration
{
/// <summary>
/// FluentAPI configuration for the Device entity.
/// </summary>
public class DeviceConfiguration : IEntityTypeConfiguration<Device>
{
/// <inheritdoc/>
public void Configure(EntityTypeBuilder<Device> builder)
{
builder
.HasIndex(entity => new { entity.DeviceId, entity.DateLastActivity });
builder
.HasIndex(entity => new { entity.AccessToken, entity.DateLastActivity });
builder
.HasIndex(entity => new { entity.UserId, entity.DeviceId });
builder
.HasIndex(entity => entity.DeviceId);
}
}
}
|