using Chrono.Model; using Microsoft.EntityFrameworkCore; using Server.Models; namespace Server; public class AppDbContext : DbContext { public AppDbContext(DbContextOptions options) : base(options) { } public DbSet CardNotes { get; set; } public DbSet UserDecks { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity().HasKey(n => n.CardName); modelBuilder.Entity(b => { b.HasKey(d => d.Id); b.Property(d => d.Cards).HasColumnType("jsonb"); b.Property(d => d.Divers).HasColumnType("jsonb"); }); } }