+ Memberships
- DDD
- FutureCreator
- UserTransactions
This commit is contained in:
2024-10-20 14:01:58 -04:00
parent 3d10427821
commit 28d74503df
117 changed files with 2149 additions and 1999 deletions

View File

@@ -10,11 +10,11 @@ public class ContentDbContext(
public DbSet<Content> Contents => Set<Content>();
public DbSet<Creator> Creators => Set<Creator>();
public DbSet<Subscription> Subscriptions => Set<Subscription>();
public DbSet<Follower> Followers => Set<Follower>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasDefaultSchema("Content");
modelBuilder.HasDefaultSchema(SchemaName);
modelBuilder
.Entity<Content>()
@@ -34,13 +34,13 @@ public class ContentDbContext(
.ToTable(nameof(ContentReaction).Pluralize());
modelBuilder
.Entity<Subscription>()
.Entity<Follower>()
.HasOne(c => c.Creator)
.WithMany()
.HasForeignKey(c => c.CreatorId);
modelBuilder
.Entity<Subscription>()
.Entity<Follower>()
.HasKey(s => new { s.CreatedBy, s.CreatorId });
modelBuilder