* clean up genre, tag, studio orphans * enforce foreign keys at connection level * wip * fix fragment scroll offset * fix see all link for music videos * add fake artist metadata * not null artist id * add artist scanning * remove improperly named music videos * code cleanup * add artists to search results and collections * clean up music video metadata / artist * add artist view * show music videos on artist page * add music video artwork placeholder
31 lines
918 B
C#
31 lines
918 B
C#
using ErsatzTV.Core.Domain;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace ErsatzTV.Infrastructure.Data.Configurations
|
|
{
|
|
public class ArtistMetadataConfiguration : IEntityTypeConfiguration<ArtistMetadata>
|
|
{
|
|
public void Configure(EntityTypeBuilder<ArtistMetadata> builder)
|
|
{
|
|
builder.ToTable("ArtistMetadata");
|
|
|
|
builder.HasMany(sm => sm.Artwork)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(sm => sm.Genres)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(sm => sm.Styles)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
builder.HasMany(sm => sm.Moods)
|
|
.WithOne()
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
}
|
|
}
|
|
}
|