using Hospitality.Domain.Entities; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; namespace Hospitality.Infrastructure.Data; public class HospitalityDbContext : IdentityDbContext { public HospitalityDbContext(DbContextOptions options) : base(options) { } public DbSet Events { get; set; } public DbSet Products { get; set; } public DbSet QuotaDefinitions { get; set; } public DbSet Groups { get; set; } public DbSet People { get; set; } public DbSet PersonQuotas { get; set; } public DbSet Transactions { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity() .HasIndex(p => p.QrCode) .IsUnique(); } }