feat(core): add password hashing and token generation interfaces

This commit is contained in:
Stevan Freeborn
2026-02-03 04:38:40 -06:00
parent 2a1a03ef6c
commit 98de115259
7 changed files with 161 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ public sealed class AppDbContext(IOptions<AppDbContextOptions> ctxOptions) : DbC
var connectionString = $"{DataSourceKey}{dbPath}";
optionsBuilder.UseSqlite(connectionString)
.AddInterceptors(new TimestampInterceptor());
.AddInterceptors(TimestampInterceptor.New());
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
@@ -4,6 +4,15 @@ namespace FiscalOS.Infra.Data;
internal sealed class TimestampInterceptor : SaveChangesInterceptor
{
private TimestampInterceptor()
{
}
public static TimestampInterceptor New()
{
return new();
}
public override InterceptionResult<int> SavingChanges(DbContextEventData eventData, InterceptionResult<int> result)
{
UpdateEntities(eventData.Context);