// using IsleBot; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace IsleBot.Migrations { [DbContext(typeof(DbManager))] [Migration("20231107003428_Initial")] partial class Initial { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.13"); modelBuilder.Entity("IsleBot.Card", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Attack") .HasColumnType("INTEGER"); b.Property("CurrentHealth") .HasColumnType("INTEGER"); b.Property("Defense") .HasColumnType("INTEGER"); b.Property("MaxHealth") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("OwnerId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("OwnerId"); b.ToTable("Cards"); }); modelBuilder.Entity("IsleBot.Match", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("PlayedTurns") .HasColumnType("INTEGER"); b.Property("PlayerACardId") .HasColumnType("INTEGER"); b.Property("PlayerAId") .HasColumnType("INTEGER"); b.Property("PlayerBCardId") .HasColumnType("INTEGER"); b.Property("PlayerBId") .HasColumnType("INTEGER"); b.Property("Status") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("PlayerACardId"); b.HasIndex("PlayerAId"); b.HasIndex("PlayerBCardId"); b.HasIndex("PlayerBId"); b.ToTable("Matches"); }); modelBuilder.Entity("IsleBot.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("UserName") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Players"); }); modelBuilder.Entity("IsleBot.Card", b => { b.HasOne("IsleBot.User", "Owner") .WithMany("Cards") .HasForeignKey("OwnerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Owner"); }); modelBuilder.Entity("IsleBot.Match", b => { b.HasOne("IsleBot.Card", "PlayerACard") .WithMany() .HasForeignKey("PlayerACardId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("IsleBot.User", "PlayerA") .WithMany() .HasForeignKey("PlayerAId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("IsleBot.Card", "PlayerBCard") .WithMany() .HasForeignKey("PlayerBCardId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("IsleBot.User", "PlayerB") .WithMany() .HasForeignKey("PlayerBId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("PlayerA"); b.Navigation("PlayerACard"); b.Navigation("PlayerB"); b.Navigation("PlayerBCard"); }); modelBuilder.Entity("IsleBot.User", b => { b.Navigation("Cards"); }); #pragma warning restore 612, 618 } } }