using Heimdall.Domain.Entities; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Heimdall.Infrastructure.Data.Configurations; public class LoginChallengeConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder 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().WithMany().HasForeignKey(x => x.UserId).OnDelete(DeleteBehavior.Cascade); } }