mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
⭐ feat(www): Finish up on the onboarding (#210)
Merging this prematurely to make sure the team is on the same boat... like dang! We need to find a better way to do this. Plus it has become too big
This commit is contained in:
18
packages/steam/DBContext.cs
Normal file
18
packages/steam/DBContext.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
public class SteamDbContext : DbContext
|
||||
{
|
||||
public DbSet<SteamUserCredential> SteamUserCredentials { get; set; }
|
||||
|
||||
public SteamDbContext(DbContextOptions<SteamDbContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
// Create a unique index on TeamId and UserId
|
||||
modelBuilder.Entity<SteamUserCredential>()
|
||||
.HasIndex(c => new { c.TeamId, c.UserId })
|
||||
.IsUnique();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user