implement Clean Architecture and user authentication
- Add LoopFit.Domain with entities (ApplicationUser, Workout, CalorieEntry, VitalData), enums (WorkoutType), and interfaces (IJwtTokenGenerator, IUserRepository, IWorkoutRepository) - Add LoopFit.Application with auth DTOs, service interfaces, and DI setup - Add LoopFit.Infrastructure with EF Core DbContext (PostgreSQL), ASP.NET Core Identity, JWT token generation, and repository implementations - Add AuthController with register/login/me endpoints and JWT Bearer auth - Add MAUI auth services (AuthService, TokenStorageService) and Login/Register Blazor pages
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using LoopFit.Domain.Entities;
|
||||
|
||||
namespace LoopFit.Infrastructure.Data;
|
||||
|
||||
public class AppDbContext : IdentityDbContext<IdentityUser>
|
||||
{
|
||||
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public DbSet<ApplicationUser> ApplicationUsers => Set<ApplicationUser>();
|
||||
public DbSet<Workout> Workouts => Set<Workout>();
|
||||
public DbSet<CalorieEntry> CalorieEntries => Set<CalorieEntry>();
|
||||
public DbSet<VitalData> VitalData => Set<VitalData>();
|
||||
}
|
||||
Reference in New Issue
Block a user