21 lines
No EOL
806 B
C#
21 lines
No EOL
806 B
C#
using Femto.Common.Infrastructure.Outbox;
|
|
using Femto.Modules.Auth.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Femto.Modules.Auth.Data;
|
|
|
|
internal class AuthContext(DbContextOptions<AuthContext> options) : DbContext(options), IOutboxContext
|
|
{
|
|
public virtual DbSet<UserIdentity> Users { get; set; }
|
|
public virtual DbSet<Session> Sessions { get; set; }
|
|
public virtual DbSet<SignupCode> SignupCodes { get; set; }
|
|
public virtual DbSet<LongTermSession> LongTermSessions { get; set; }
|
|
public virtual DbSet<OutboxEntry> Outbox { get; set; }
|
|
|
|
protected override void OnModelCreating(ModelBuilder builder)
|
|
{
|
|
base.OnModelCreating(builder);
|
|
builder.HasDefaultSchema("authn");
|
|
builder.ApplyConfigurationsFromAssembly(typeof(AuthContext).Assembly);
|
|
}
|
|
} |