mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
parent
dca5d13826
commit
dedf42ac87
33 changed files with 386 additions and 3294 deletions
|
@ -23,7 +23,7 @@ namespace Ombi.Store.Context
|
|||
|
||||
public DbSet<NotificationTemplates> NotificationTemplates { get; set; }
|
||||
public DbSet<GlobalSettings> Settings { get; set; }
|
||||
public DbSet<PlexContent> PlexContent { get; set; }
|
||||
public DbSet<PlexServerContent> PlexServerContent { get; set; }
|
||||
public DbSet<PlexEpisode> PlexEpisode { get; set; }
|
||||
public DbSet<RadarrCache> RadarrCache { get; set; }
|
||||
public DbSet<CouchPotatoCache> CouchPotatoCache { get; set; }
|
||||
|
@ -55,11 +55,10 @@ namespace Ombi.Store.Context
|
|||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
builder.Entity<PlexEpisode>()
|
||||
.HasOne(p => p.Series)
|
||||
.WithMany(b => b.Episodes)
|
||||
builder.Entity<PlexServerContent>().HasMany(x => x.Episodes)
|
||||
.WithOne(x => x.Series)
|
||||
.HasPrincipalKey(x => x.Key)
|
||||
.HasForeignKey(p => p.GrandparentKey);
|
||||
.HasForeignKey(x => x.GrandparentKey);
|
||||
|
||||
builder.Entity<EmbyEpisode>()
|
||||
.HasOne(p => p.Series)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue