//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using SOR.Database.Contexts;
#nullable disable
namespace SOR.Database.Migrations.Collection
{
[DbContext(typeof(CollectionDbContext))]
partial class CollectionDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("collection")
.HasAnnotation("ProductVersion", "8.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("SOR.Database.Entities.Collection.Deck", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AccountId")
.HasColumnType("uuid");
b.Property("ArchSpiritCardDefinitionId")
.HasColumnType("uuid");
b.Property("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property("Description")
.HasColumnType("text");
b.Property("IsValid")
.HasColumnType("boolean");
b.Property("Name")
.IsRequired()
.HasColumnType("text");
b.Property("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("AccountId");
b.ToTable("decks", "collection");
});
modelBuilder.Entity("SOR.Database.Entities.Collection.DeckCard", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("CardDefinitionId")
.HasColumnType("uuid");
b.Property("DeckId")
.HasColumnType("uuid");
b.Property("Quantity")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("DeckId", "CardDefinitionId")
.IsUnique();
b.ToTable("deck_cards", "collection");
});
modelBuilder.Entity("SOR.Database.Entities.Collection.PlayerCard", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AccountId")
.HasColumnType("uuid");
b.Property("AcquiredAt")
.HasColumnType("timestamp with time zone");
b.Property("CardDefinitionId")
.HasColumnType("uuid");
b.Property("IsFoil")
.HasColumnType("boolean");
b.Property("IsTradeable")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(true);
b.Property("SerialNumber")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("AccountId");
b.HasIndex("AccountId", "CardDefinitionId");
b.ToTable("player_cards", "collection");
});
modelBuilder.Entity("SOR.Database.Entities.Collection.PlayerCosmetic", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AccountId")
.HasColumnType("uuid");
b.Property("AcquiredAt")
.HasColumnType("timestamp with time zone");
b.Property("CosmeticId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("AccountId");
b.HasIndex("AccountId", "CosmeticId")
.IsUnique();
b.ToTable("player_cosmetics", "collection");
});
modelBuilder.Entity("SOR.Database.Entities.Collection.DeckCard", b =>
{
b.HasOne("SOR.Database.Entities.Collection.Deck", "Deck")
.WithMany("Cards")
.HasForeignKey("DeckId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Deck");
});
modelBuilder.Entity("SOR.Database.Entities.Collection.Deck", b =>
{
b.Navigation("Cards");
});
#pragma warning restore 612, 618
}
}
}