//
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");
b.HasData(
new
{
Id = 1
},
new
{
Id = 2
},
new
{
Id = 3
});
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Background", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.UseIdentityColumn();
b.HasKey("Id");
b.ToTable("Backgrounds");
b.HasData(
new
{
Id = 1
},
new
{
Id = 2
},
new
{
Id = 3
});
});
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");
b.HasData(
new
{
Id = 1,
AlignmentId = 1,
BackgroundId = 1,
CharacterId = 1,
ClassId = 1,
Name = "Bob",
RaceId = 1,
Sex = "Male"
},
new
{
Id = 2,
AlignmentId = 2,
BackgroundId = 2,
CharacterId = 2,
ClassId = 2,
Name = "Queen Daenerys Stormborn of the House Targaryen, the First of Her Name, Queen of the Andals, the Rhoynar and the First Men, Lady of the Seven Kingdoms and Protector of the Realm, Lady of Dragonstone, Queen of Meereen, Khaleesi of the Great Grass Sea, the Unburnt, Breaker of Chains and Mother of Dragons.",
RaceId = 2,
Sex = "Female"
},
new
{
Id = 3,
AlignmentId = 3,
BackgroundId = 3,
CharacterId = 3,
ClassId = 3,
Name = "Gandalf the White",
RaceId = 3,
Sex = "Both"
});
});
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");
b.HasData(
new
{
Id = 1,
UserId = 1
},
new
{
Id = 2,
UserId = 2
},
new
{
Id = 3,
UserId = 3
});
});
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");
b.HasData(
new
{
Id = 1,
Name = "Fighter"
},
new
{
Id = 2,
Name = "Paladin"
},
new
{
Id = 3,
Name = "Cleric"
});
});
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");
b.HasData(
new
{
Id = 1,
Name = "Human"
},
new
{
Id = 2,
Name = "Dwarf"
},
new
{
Id = 3,
Name = "Elf"
});
});
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");
b.HasData(
new
{
Id = 1,
ArmorClass = 9,
CharacterId = 1,
CurrentHealthPoints = 18,
ExperiencePoints = 2,
HealthPoints = 20,
Initiative = 12,
Level = 1,
Proficiency = 1,
Speed = 5
},
new
{
Id = 2,
ArmorClass = 12,
CharacterId = 2,
CurrentHealthPoints = 26,
ExperiencePoints = 0,
HealthPoints = 26,
Initiative = 7,
Level = 1,
Proficiency = 1,
Speed = 10
},
new
{
Id = 3,
ArmorClass = 2,
CharacterId = 3,
CurrentHealthPoints = 7,
ExperiencePoints = 24,
HealthPoints = 7,
Initiative = 18,
Level = 1,
Proficiency = 2,
Speed = 15
});
});
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
}
}
}