//
using System;
using MTG_CollectionVerwaltung.Data.MTGCollection;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MTG_CollectionVerwaltung.Data.Migrations.MTG
{
[DbContext(typeof(MTGContext))]
partial class MTGContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.19");
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.Property("Id")
.HasColumnType("TEXT");
b.Property("CardName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property("Cmc")
.HasColumnType("INTEGER");
b.Property("CollectorNumber")
.HasColumnType("TEXT");
b.Property("Foil")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property("ManaCost")
.HasColumnType("TEXT");
b.Property("NonFoil")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property("OtherFace")
.HasColumnType("TEXT");
b.Property("Power")
.HasColumnType("TEXT");
b.Property("Rarity")
.HasColumnType("TEXT");
b.Property("SetCode")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("TEXT");
b.Property("SuperTypeId")
.HasColumnType("INTEGER");
b.Property("Toughness")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CardName");
b.HasIndex("SetCode");
b.HasIndex("SuperTypeId");
b.HasIndex("CollectorNumber", "SetCode");
b.ToTable("Cards");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardCollection", b =>
{
b.Property("CardId")
.HasColumnType("TEXT");
b.Property("UserId")
.HasColumnType("TEXT");
b.Property("Count")
.HasColumnType("INTEGER");
b.HasKey("CardId", "UserId");
b.HasIndex("UserId");
b.ToTable("CardCollections");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrinting", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CardId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property("FlavorText")
.HasColumnType("TEXT");
b.Property("ImageUriLarge")
.HasColumnType("TEXT");
b.Property("ImageUriNormal")
.HasColumnType("TEXT");
b.Property("ImageUriSmall")
.HasColumnType("TEXT");
b.Property("Lang")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property("OracleText")
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("Id");
b.HasIndex("Name");
b.HasIndex("OracleText");
b.HasIndex("CardId", "Lang")
.IsUnique();
b.ToTable("CardPrintings");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrintingFts", b =>
{
b.Property("CardId")
.IsRequired()
.HasColumnType("TEXT");
b.Property("FlavorText")
.HasColumnType("TEXT");
b.Property("Lang")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property("OracleText")
.HasColumnType("TEXT");
b.ToTable((string)null);
b.ToView(null, (string)null);
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardType", b =>
{
b.Property("CardId")
.HasColumnType("TEXT");
b.Property("TypeId")
.HasColumnType("INTEGER");
b.HasKey("CardId", "TypeId");
b.HasIndex("TypeId");
b.ToTable("CardTypes");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.MTGType", b =>
{
b.Property("TypeId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("TypeDe")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property("TypeEn")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("TypeId");
b.ToTable("Types");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Set", b =>
{
b.Property("SetCode")
.HasMaxLength(10)
.HasColumnType("TEXT");
b.Property("CardCount")
.HasColumnType("INTEGER");
b.Property("ReleaseDate")
.HasColumnType("TEXT");
b.Property("SetIcon")
.IsRequired()
.HasColumnType("TEXT");
b.Property("SetName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property("SetType")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("SetCode");
b.ToTable("Sets");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Supertype", b =>
{
b.Property("TypeId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("TypeDe")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property("TypeEn")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("TypeId");
b.ToTable("Supertypes");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Set", "Set")
.WithMany("Cards")
.HasForeignKey("SetCode")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Supertype", "SuperType")
.WithMany()
.HasForeignKey("SuperTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Set");
b.Navigation("SuperType");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardCollection", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("Collections")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrinting", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("Printings")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardType", b =>
{
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.Card", "Card")
.WithMany("CardTypes")
.HasForeignKey("CardId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MTG_CollectionVerwaltung.Data.MTGCollection.MTGType", "Type")
.WithMany()
.HasForeignKey("TypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Card");
b.Navigation("Type");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.Navigation("CardTypes");
b.Navigation("Collections");
b.Navigation("Printings");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Set", b =>
{
b.Navigation("Cards");
});
#pragma warning restore 612, 618
}
}
}