feat(infra): update refresh token model

This commit is contained in:
Stevan Freeborn
2026-02-03 04:38:40 -06:00
parent eb2d9fb2d0
commit 1335f62ec3
4 changed files with 148 additions and 3 deletions
+5 -3
View File
@@ -36,13 +36,13 @@ public sealed class AppDbContext(IOptions<AppDbContextOptions> ctxOptions) : DbC
foreach (var entityType in entityTypes)
{
modelBuilder.Entity(entityType.ClrType)
.HasKey(nameof(Entity.Id));
.HasKey(nameof(Entity.Id));
modelBuilder.Entity(entityType.ClrType)
.Property(nameof(Entity.CreatedAt));
.Property(nameof(Entity.CreatedAt));
modelBuilder.Entity(entityType.ClrType)
.Property(nameof(Entity.UpdatedAt));
.Property(nameof(Entity.UpdatedAt));
}
modelBuilder.Entity<User>(static eb =>
@@ -59,6 +59,8 @@ public sealed class AppDbContext(IOptions<AppDbContextOptions> ctxOptions) : DbC
modelBuilder.Entity<RefreshToken>(static eb =>
{
eb.Property(static t => t.Id);
eb.Property(static t => t.ExpiresAt);
eb.Property(static t => t.Token);
});
}
}