Vibe deck builder WIP
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Chrono.Model;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Server.Models;
|
||||
|
||||
namespace Server;
|
||||
|
||||
@@ -10,9 +11,17 @@ public class AppDbContext : DbContext
|
||||
}
|
||||
|
||||
public DbSet<CardNote> CardNotes { get; set; }
|
||||
public DbSet<UserDeck> UserDecks { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<CardNote>().HasKey(n => n.CardName);
|
||||
|
||||
modelBuilder.Entity<UserDeck>(b =>
|
||||
{
|
||||
b.HasKey(d => d.Id);
|
||||
b.Property(d => d.Cards).HasColumnType("jsonb");
|
||||
b.Property(d => d.Divers).HasColumnType("jsonb");
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user