using Microsoft.EntityFrameworkCore; using Luticate2.Auth.DataAccess.Models; namespace Luticate2.Auth.DataAccess { public partial class LuDatabaseContext : DbContext { public LuDatabaseContext(DbContextOptions options) :base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity() .HasKey(c => new { c.id }); modelBuilder.Entity() .HasKey(c => new { c.id }); modelBuilder.Entity() .HasKey(c => new { c.id }); modelBuilder.Entity() .HasOne(e => e.fk_lu_authentication_sources) .WithMany(e => e.lu_users_fk) .HasForeignKey("authentication_source_id") .HasConstraintName("lu_users_authentication_source_id_fkey"); modelBuilder.Entity() .HasKey(c => new { c.user_id, c.group_id }); modelBuilder.Entity() .HasOne(e => e.fk_lu_users) .WithMany(e => e.lu_verb_users_groups_fk) .HasForeignKey("user_id") .HasConstraintName("lu_verb_users_groups_user_id_fkey"); modelBuilder.Entity() .HasOne(e => e.fk_lu_groups) .WithMany(e => e.lu_verb_users_groups_fk) .HasForeignKey("group_id") .HasConstraintName("lu_verb_users_groups_group_id_fkey"); } public DbSet lu_authentication_sources { get; set; } public DbSet lu_groups { get; set; } public DbSet lu_users { get; set; } public DbSet lu_verb_users_groups { get; set; } } }