feat(core): add password hashing and token generation interfaces
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user