* add music videos library * add music video tables * first pass at music video library scan * support music videos in playouts * display music videos in search results and collections * fix music video thumbnails * remove some obsolete fields
31 lines
934 B
C#
31 lines
934 B
C#
using ErsatzTV.Core.Domain;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace ErsatzTV.Infrastructure.Data.Configurations
|
|
{
|
|
public class MusicVideoMetadataConfiguration : IEntityTypeConfiguration<MusicVideoMetadata>
|
|
{
|
|
public void Configure(EntityTypeBuilder<MusicVideoMetadata> builder)
|
|
{
|
|
builder.ToTable("MusicVideoMetadata");
|
|
|
|
builder.HasMany(mm => mm.Artwork)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(mm => mm.Genres)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(mm => mm.Tags)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(mm => mm.Studios)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
}
|
|
}
|
|
}
|