chore: deleted all the stuff we don't need here

This commit is contained in:
2025-09-20 23:08:08 +03:00
parent 8ea18f1096
commit 44881818a2
67 changed files with 1 additions and 3139 deletions

View File

@@ -1,32 +1,16 @@
using GamificationService.Models.Database;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
namespace GamificationService.Database;
public class ApplicationContext : IdentityDbContext<ApplicationUser, ApplicationRole, long>
public class ApplicationContext : DbContext
{
public ApplicationContext(DbContextOptions<ApplicationContext> options) : base(options)
{
}
public DbSet<Right> Rights { get; set; }
public DbSet<RefreshToken> RefreshTokens { get; set; }
public DbSet<ApplicationUser> Users { get; set; }
public DbSet<ApplicationRole> Roles { get; set; }
public DbSet<UserRole> UserRoles { get; set; }
public DbSet<RoleRight> RoleRights { get; set; }
public DbSet<UserProfile> UserProfiles { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<UserRole>()
.HasKey(ur => new { ur.UserId, ur.RoleId });
modelBuilder.Entity<RoleRight>()
.HasKey(rr => new { rr.RoleId, rr.RightId });
}
}