add music videos library (#125)
* 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
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using ErsatzTV.Core.Domain;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace ErsatzTV.Infrastructure.Data.Configurations
|
||||
{
|
||||
public class MusicVideoConfiguration : IEntityTypeConfiguration<MusicVideo>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<MusicVideo> builder)
|
||||
{
|
||||
builder.ToTable("MusicVideo");
|
||||
|
||||
builder.HasMany(m => m.MusicVideoMetadata)
|
||||
.WithOne(m => m.MusicVideo)
|
||||
.HasForeignKey(m => m.MusicVideoId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
builder.HasMany(m => m.MediaVersions)
|
||||
.WithOne()
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user