Fix runtime

This commit is contained in:
2024-10-20 16:49:59 -04:00
parent 070babb17a
commit 114a10416a
29 changed files with 133 additions and 2677 deletions

View File

@@ -8,7 +8,6 @@ public class ContentDbContext(
public DbSet<Content> Contents => Set<Content>();
public DbSet<Creator> Creators => Set<Creator>();
public DbSet<Follower> Followers => Set<Follower>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
@@ -31,16 +30,6 @@ public class ContentDbContext(
.OwnsMany(c => c.Reactions)
.ToTable("Reactions");
modelBuilder
.Entity<Follower>()
.HasOne(c => c.Creator)
.WithMany()
.HasForeignKey(c => c.CreatorId);
modelBuilder
.Entity<Follower>()
.HasKey(s => new { s.CreatedBy, s.CreatorId });
modelBuilder
.Entity<Creator>()
.OwnsOne<Socials>(x => x.Socials)