This commit is contained in:
6d486f49
2026-08-14 15:56:17 -04:00
parent af64b9e95c
commit 09a8adfc4a
827 changed files with 65045 additions and 71849 deletions
+28
View File
@@ -0,0 +1,28 @@
using Cloud.Models;
using Microsoft.EntityFrameworkCore;
using Model;
namespace Cloud;
public class AppDbContext : DbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
{
}
public DbSet<CardNote> CardNotes { get; set; }
public DbSet<UserDeck> UserDecks { get; set; }
public DbSet<PasskeyCredential> PasskeyCredentials { 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");
});
}
}