Files
2025-09-07 19:06:43 +02:00

342 lines
12 KiB
C#

// <auto-generated />
using System;
using MTG_CollectionVerwaltung.Data.MTGCollection;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MTG_CollectionVerwaltung.Data.Migrations.MTG
{
[DbContext(typeof(MTGContext))]
[Migration("20250828091558_MTG_InitialCreate")]
partial class MTG_InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.19");
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Card", b =>
{
b.Property<string>("Id")
.HasColumnType("TEXT");
b.Property<string>("CardName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<int>("Cmc")
.HasColumnType("INTEGER");
b.Property<string>("CollectorNumber")
.HasColumnType("TEXT");
b.Property<bool>("Foil")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<string>("ManaCost")
.HasColumnType("TEXT");
b.Property<bool>("NonFoil")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(false);
b.Property<string>("OtherFace")
.HasColumnType("TEXT");
b.Property<string>("Power")
.HasColumnType("TEXT");
b.Property<string>("Rarity")
.HasColumnType("TEXT");
b.Property<string>("SetCode")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("TEXT");
b.Property<int>("SuperTypeId")
.HasColumnType("INTEGER");
b.Property<string>("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<string>("CardId")
.HasColumnType("TEXT");
b.Property<string>("UserId")
.HasColumnType("TEXT");
b.Property<int>("Count")
.HasColumnType("INTEGER");
b.HasKey("CardId", "UserId");
b.HasIndex("UserId");
b.ToTable("CardCollections");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardPrinting", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("CardId")
.IsRequired()
.HasMaxLength(40)
.HasColumnType("TEXT");
b.Property<string>("FlavorText")
.HasColumnType("TEXT");
b.Property<string>("ImageUriLarge")
.HasColumnType("TEXT");
b.Property<string>("ImageUriNormal")
.HasColumnType("TEXT");
b.Property<string>("ImageUriSmall")
.HasColumnType("TEXT");
b.Property<string>("Lang")
.IsRequired()
.HasMaxLength(5)
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("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<string>("CardId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("FlavorText")
.HasColumnType("TEXT");
b.Property<string>("Lang")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("OracleText")
.HasColumnType("TEXT");
b.ToTable((string)null);
b.ToView(null, (string)null);
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.CardType", b =>
{
b.Property<string>("CardId")
.HasColumnType("TEXT");
b.Property<int>("TypeId")
.HasColumnType("INTEGER");
b.HasKey("CardId", "TypeId");
b.HasIndex("TypeId");
b.ToTable("CardTypes");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.MTGType", b =>
{
b.Property<int>("TypeId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("TypeDe")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("TypeEn")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.HasKey("TypeId");
b.ToTable("Types");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Set", b =>
{
b.Property<string>("SetCode")
.HasMaxLength(10)
.HasColumnType("TEXT");
b.Property<int>("CardCount")
.HasColumnType("INTEGER");
b.Property<DateTime>("ReleaseDate")
.HasColumnType("TEXT");
b.Property<string>("SetIcon")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SetName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT");
b.Property<string>("SetType")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("SetCode");
b.ToTable("Sets");
});
modelBuilder.Entity("MTG_CollectionVerwaltung.Data.MTGCollection.Supertype", b =>
{
b.Property<int>("TypeId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("TypeDe")
.IsRequired()
.HasColumnType("TEXT")
.UseCollation("NOCASE");
b.Property<string>("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
}
}
}