feat(backend): add skeleton discord auth controller
This commit is contained in:
parent
50257d61f8
commit
493a6e4d29
4 changed files with 48 additions and 1 deletions
|
@ -17,6 +17,7 @@ public class DatabaseContext : DbContext
|
|||
public DbSet<FediverseApplication> FediverseApplications { get; set; }
|
||||
public DbSet<Token> Tokens { get; set; }
|
||||
public DbSet<Application> Applications { get; set; }
|
||||
public DbSet<TemporaryKey> TemporaryKeys { get; set; }
|
||||
|
||||
public DatabaseContext(Config config)
|
||||
{
|
||||
|
@ -47,6 +48,7 @@ public class DatabaseContext : DbContext
|
|||
{
|
||||
modelBuilder.Entity<User>().HasIndex(u => u.Username).IsUnique();
|
||||
modelBuilder.Entity<Member>().HasIndex(m => new { m.UserId, m.Name }).IsUnique();
|
||||
modelBuilder.Entity<TemporaryKey>().HasIndex(k => k.Key).IsUnique();
|
||||
|
||||
modelBuilder.Entity<User>()
|
||||
.OwnsOne(u => u.Fields, f => f.ToJson())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue