using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace CalledIt.DataAccess.Entities.Configuration;

public class RevokedTokenConfiguration : IEntityTypeConfiguration<RevokedTokenEntity>
{
    public void Configure(EntityTypeBuilder<RevokedTokenEntity> builder)
    {
        builder.HasKey(r => r.Jti);
        builder.Property(r => r.Jti).IsRequired();
        builder.HasIndex(r => r.ExpiresAtUtc);
    }
}
