using Domain.Entities.Developers; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Infrastructure.Persistence.Configurations.Developers; public class ApiRateLimitConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.HasOne(x => x.Application).WithMany().HasForeignKey(x => x.ApplicationID).OnDelete(DeleteBehavior.Cascade); builder.HasIndex(x => x.ApplicationID).IsUnique(); builder.ToTable(nameof(ApiRateLimit), x => x.HasComment("앱별 Rate Limit override")); builder.HasKey(x => x.ID); builder.Property(x => x.LimitPerMinute).IsRequired(); builder.Property(x => x.CreatedAt).IsRequired(); builder.Property(x => x.UpdatedAt).IsRequired(); } }