using Beconnect.PaymentService.Models; using Microsoft.EntityFrameworkCore; namespace Beconnect.PaymentService.Data; public class PaymentDbContext : DbContext { public PaymentDbContext(DbContextOptions options) : base(options) { } public DbSet CheckoutRequests => Set(); protected override void OnModelCreating(ModelBuilder builder) { builder.Entity(e => { e.HasIndex(c => c.IdempotencyKey).IsUnique(); e.HasIndex(c => c.UserId); e.HasIndex(c => c.Status); e.HasIndex(c => c.ExternalRef); }); } }