using Fengling.AuthService.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

namespace Fengling.AuthService.Data;

public class ApplicationDbContextFactory : IDesignTimeDbContextFactory<ApplicationDbContext>
{
    public ApplicationDbContext CreateDbContext(string[] args)
    {
        var optionsBuilder = new DbContextOptionsBuilder<ApplicationDbContext>();
        optionsBuilder.UseNpgsql("Host=81.68.223.70;Port=15432;Database=fengling_auth;Username=movingsam;Password=sl52788542");
        optionsBuilder.UseOpenIddict();
        return new ApplicationDbContext(optionsBuilder.Options);
    }
}
