Restructuing

This commit is contained in:
2026-07-05 16:30:58 -04:00
parent 678e20d402
commit 7b0f2ce1a5
767 changed files with 354 additions and 76 deletions
+29
View File
@@ -0,0 +1,29 @@
using Model;
using Microsoft.EntityFrameworkCore;
using Cloud.Models;
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");
});
}
}