Skip to content

Commit

Permalink
feat: add playerpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Thundernerd committed Oct 22, 2023
1 parent 99b36c9 commit 3e18c5c
Show file tree
Hide file tree
Showing 7 changed files with 1,060 additions and 1 deletion.
11 changes: 11 additions & 0 deletions GTRContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public GTRContext(DbContextOptions<GTRContext> options)

public virtual DbSet<PersonalBest> PersonalBests { get; set; }

public virtual DbSet<PlayerPoints> PlayerPoints { get; set; }

public virtual DbSet<Record> Records { get; set; }

public virtual DbSet<Stat> Stats { get; set; }
Expand Down Expand Up @@ -87,6 +89,15 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasConstraintName("personal_bests_user_fkey");
});

modelBuilder.Entity<PlayerPoints>(entity =>
{
entity.HasKey(e => e.Id).HasName("player_points_pkey");
entity.HasOne(d => d.UserNavigation).WithMany(p => p.PlayerPoints)
.OnDelete(DeleteBehavior.SetNull)
.HasConstraintName("player_points_user_fkey");
});

modelBuilder.Entity<Record>(entity =>
{
entity.HasKey(e => e.Id).HasName("records_pkey");
Expand Down
Loading

0 comments on commit 3e18c5c

Please sign in to comment.