diff options
| author | Orry Verducci <orry@orryverducci.co.uk> | 2021-10-31 10:04:14 +0000 |
|---|---|---|
| committer | Orry Verducci <orry@orryverducci.co.uk> | 2021-10-31 10:04:14 +0000 |
| commit | 3a89e88033fc54360d926d73591293660e6bf43c (patch) | |
| tree | f3064d4893b72bb329521858ea51d1f283a3ae47 /Jellyfin.Server.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs | |
| parent | d5b63092ed1b4b6ef4da2a5cdccec472aa1c06b3 (diff) | |
| parent | 5a7433472ef88c7e8e52840425a7296e242155ee (diff) | |
Merge remote-tracking branch 'upstream/master' into mbaff-interlace-detection
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs new file mode 100644 index 000000000..038afd752 --- /dev/null +++ b/Jellyfin.Server.Implementations/ModelConfiguration/DeviceOptionsConfiguration.cs @@ -0,0 +1,20 @@ +using Jellyfin.Data.Entities.Security; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; + +namespace Jellyfin.Server.Implementations.ModelConfiguration +{ + /// <summary> + /// FluentAPI configuration for the DeviceOptions entity. + /// </summary> + public class DeviceOptionsConfiguration : IEntityTypeConfiguration<DeviceOptions> + { + /// <inheritdoc/> + public void Configure(EntityTypeBuilder<DeviceOptions> builder) + { + builder + .HasIndex(entity => entity.DeviceId) + .IsUnique(); + } + } +} |
