//
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SessionCompanion.Database;
namespace SessionCompanion.Database.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseIdentityColumns()
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.0");
modelBuilder.Entity("SessionCompanion.Database.Tables.Alignment", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.HasKey("Id");
b.ToTable("Alignments");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.HasKey("Id");
b.ToTable("Backgrounds");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Biography", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("AlignmentId")
.HasColumnType("int");
b.Property("BackgroundId")
.HasColumnType("int");
b.Property("CharacterId")
.HasColumnType("int");
b.Property("ClassId")
.HasColumnType("int");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("RaceId")
.HasColumnType("int");
b.Property("Sex")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("AlignmentId");
b.HasIndex("BackgroundId");
b.HasIndex("CharacterId")
.IsUnique();
b.HasIndex("ClassId");
b.HasIndex("RaceId");
b.ToTable("Biographies");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("UserId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("Characters");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Charisma", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("CanDeception")
.HasColumnType("bit");
b.Property("CanIntimidation")
.HasColumnType("bit");
b.Property("CanPerformance")
.HasColumnType("bit");
b.Property("CanPersuasion")
.HasColumnType("bit");
b.Property("CanSaveThrows")
.HasColumnType("bit");
b.Property("CharacterId")
.HasColumnType("int");
b.Property("Deception")
.HasColumnType("int");
b.Property("Intimidation")
.HasColumnType("int");
b.Property("Modification")
.HasColumnType("int");
b.Property("Performance")
.HasColumnType("int");
b.Property("Persuasion")
.HasColumnType("int");
b.Property("SavingThrows")
.HasColumnType("int");
b.Property("Value")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId")
.IsUnique();
b.ToTable("Charismas");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Class", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Classes");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Constitution", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("CanSaveThrows")
.HasColumnType("bit");
b.Property("CharacterId")
.HasColumnType("int");
b.Property("Modification")
.HasColumnType("int");
b.Property("SavingThrows")
.HasColumnType("int");
b.Property("Value")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId")
.IsUnique();
b.ToTable("Constitutions");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Dexterity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("Acrobatics")
.HasColumnType("int");
b.Property("CanAcrobatics")
.HasColumnType("bit");
b.Property("CanSaveThrows")
.HasColumnType("bit");
b.Property("CanSleightOfHand")
.HasColumnType("bit");
b.Property("CanStealth")
.HasColumnType("bit");
b.Property("CharacterId")
.HasColumnType("int");
b.Property("Modification")
.HasColumnType("int");
b.Property("SavingThrows")
.HasColumnType("int");
b.Property("SleightOfHand")
.HasColumnType("int");
b.Property("Stealth")
.HasColumnType("int");
b.Property("Value")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId")
.IsUnique();
b.ToTable("Dexterities");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Intelligence", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("Arcana")
.HasColumnType("int");
b.Property("CanArcana")
.HasColumnType("bit");
b.Property("CanHistory")
.HasColumnType("bit");
b.Property("CanInvestigation")
.HasColumnType("bit");
b.Property("CanNature")
.HasColumnType("bit");
b.Property("CanReligion")
.HasColumnType("bit");
b.Property("CanSaveThrows")
.HasColumnType("bit");
b.Property("CharacterId")
.HasColumnType("int");
b.Property("History")
.HasColumnType("int");
b.Property("Investigation")
.HasColumnType("int");
b.Property("Modification")
.HasColumnType("int");
b.Property("Nature")
.HasColumnType("int");
b.Property("Religion")
.HasColumnType("int");
b.Property("SavingThrows")
.HasColumnType("int");
b.Property("Value")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId")
.IsUnique();
b.ToTable("Intelligences");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Race", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Races");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Statistics", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("ArmorClass")
.HasColumnType("int");
b.Property("CharacterId")
.HasColumnType("int");
b.Property("CurrentHealthPoints")
.HasColumnType("int");
b.Property("ExperiencePoints")
.HasColumnType("int");
b.Property("HealthPoints")
.HasColumnType("int");
b.Property("Initiative")
.HasColumnType("int");
b.Property("Level")
.HasColumnType("int");
b.Property("Proficiency")
.HasColumnType("int");
b.Property("Speed")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId")
.IsUnique();
b.ToTable("Statistics");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Strength", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("Athletics")
.HasColumnType("int");
b.Property("CanAthletics")
.HasColumnType("bit");
b.Property("CanSaveThrows")
.HasColumnType("bit");
b.Property("CharacterId")
.HasColumnType("int");
b.Property("Modification")
.HasColumnType("int");
b.Property("SavingThrows")
.HasColumnType("int");
b.Property("Value")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId")
.IsUnique();
b.ToTable("Strengths");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("Password")
.HasColumnType("nvarchar(max)");
b.Property("Username")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Users");
b.HasData(
new
{
Id = 1,
Password = "123",
Username = "Morwiec"
},
new
{
Id = 2,
Password = "123",
Username = "Cichoklepiec"
},
new
{
Id = 3,
Password = "123",
Username = "Ruletka"
});
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Wisdom", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.Property("AnimalHandling")
.HasColumnType("int");
b.Property("CanAnimalHandling")
.HasColumnType("bit");
b.Property("CanInsight")
.HasColumnType("bit");
b.Property("CanMedicine")
.HasColumnType("bit");
b.Property("CanPerception")
.HasColumnType("bit");
b.Property("CanSaveThrows")
.HasColumnType("bit");
b.Property("CanSurvival")
.HasColumnType("bit");
b.Property("CharacterId")
.HasColumnType("int");
b.Property("Insight")
.HasColumnType("int");
b.Property("Medicine")
.HasColumnType("int");
b.Property("Modification")
.HasColumnType("int");
b.Property("Perception")
.HasColumnType("int");
b.Property("SavingThrows")
.HasColumnType("int");
b.Property("Survival")
.HasColumnType("int");
b.Property("Value")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CharacterId")
.IsUnique();
b.ToTable("Wisdoms");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Biography", b =>
{
b.HasOne("SessionCompanion.Database.Tables.Alignment", "Alignment")
.WithMany("Biography")
.HasForeignKey("AlignmentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SessionCompanion.Database.Tables.Background", "Background")
.WithMany("Biography")
.HasForeignKey("BackgroundId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SessionCompanion.Database.Tables.Character", "Character")
.WithOne("Biography")
.HasForeignKey("SessionCompanion.Database.Tables.Biography", "CharacterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SessionCompanion.Database.Tables.Class", "Class")
.WithMany("Biography")
.HasForeignKey("ClassId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("SessionCompanion.Database.Tables.Race", "Race")
.WithMany("Biography")
.HasForeignKey("RaceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Alignment");
b.Navigation("Background");
b.Navigation("Character");
b.Navigation("Class");
b.Navigation("Race");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b =>
{
b.HasOne("SessionCompanion.Database.Tables.User", "User")
.WithMany("Character")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Charisma", b =>
{
b.HasOne("SessionCompanion.Database.Tables.Character", "Character")
.WithOne("Charisma")
.HasForeignKey("SessionCompanion.Database.Tables.Charisma", "CharacterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Character");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Constitution", b =>
{
b.HasOne("SessionCompanion.Database.Tables.Character", "Character")
.WithOne("Constitution")
.HasForeignKey("SessionCompanion.Database.Tables.Constitution", "CharacterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Character");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Dexterity", b =>
{
b.HasOne("SessionCompanion.Database.Tables.Character", "Character")
.WithOne("Dexterity")
.HasForeignKey("SessionCompanion.Database.Tables.Dexterity", "CharacterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Character");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Intelligence", b =>
{
b.HasOne("SessionCompanion.Database.Tables.Character", "Character")
.WithOne("Intelligence")
.HasForeignKey("SessionCompanion.Database.Tables.Intelligence", "CharacterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Character");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Statistics", b =>
{
b.HasOne("SessionCompanion.Database.Tables.Character", "Character")
.WithOne("Statistics")
.HasForeignKey("SessionCompanion.Database.Tables.Statistics", "CharacterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Character");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Strength", b =>
{
b.HasOne("SessionCompanion.Database.Tables.Character", "Character")
.WithOne("Strength")
.HasForeignKey("SessionCompanion.Database.Tables.Strength", "CharacterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Character");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Wisdom", b =>
{
b.HasOne("SessionCompanion.Database.Tables.Character", "Character")
.WithOne("Wisdom")
.HasForeignKey("SessionCompanion.Database.Tables.Wisdom", "CharacterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Character");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Alignment", b =>
{
b.Navigation("Biography");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b =>
{
b.Navigation("Biography");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Character", b =>
{
b.Navigation("Biography");
b.Navigation("Charisma");
b.Navigation("Constitution");
b.Navigation("Dexterity");
b.Navigation("Intelligence");
b.Navigation("Statistics");
b.Navigation("Strength");
b.Navigation("Wisdom");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Class", b =>
{
b.Navigation("Biography");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Race", b =>
{
b.Navigation("Biography");
});
modelBuilder.Entity("SessionCompanion.Database.Tables.User", b =>
{
b.Navigation("Character");
});
#pragma warning restore 612, 618
}
}
}