Files
Heimdall/src/Heimdall.Infrastructure/Data/Configurations/LoginChallengeConfiguration.cs
T
arnaud.dartois 622add46ad
Heimdall Gitea / Detect CI scope (pull_request) Successful in 6s
Heimdall Gitea / Build and tests (pull_request) Failing after 4m5s
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Failing after 1s
refactor(identity): isolate ASP.NET Identity in Infrastructure
2026-11-04 11:37:53 +01:00

20 lines
750 B
C#

using Heimdall.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Heimdall.Infrastructure.Identity;
namespace Heimdall.Infrastructure.Data.Configurations;
public class LoginChallengeConfiguration : IEntityTypeConfiguration<LoginChallenge>
{
public void Configure(EntityTypeBuilder<LoginChallenge> builder)
{
builder.ToTable("login_challenges");
builder.HasKey(x => x.Id);
builder.Property(x => x.Id).HasMaxLength(64);
builder.Property(x => x.SecurityStamp).HasMaxLength(256);
builder.HasIndex(x => x.ExpiresAt);
builder.HasOne<IdentityAppUser>().WithMany().HasForeignKey(x => x.UserId).OnDelete(DeleteBehavior.Cascade);
}
}