+ Tips
+ Memberships - DDD - FutureCreator - UserTransactions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user