SES-118 Endpoint dla staystyk #50

Merged
s426134 merged 11 commits from SES-118 into dev 2021-01-04 09:40:04 +01:00
3 changed files with 9258 additions and 0 deletions
Showing only changes of commit f6ff8aaf20 - Show all commits

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,163 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace SessionCompanion.Database.Migrations
{
public partial class SeedStatistics : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.InsertData(
table: "Charismas",
columns: new[] { "Id", "CanDeception", "CanIntimidation", "CanPerformance", "CanPersuasion", "CanSaveThrows", "CharacterId", "Deception", "Intimidation", "Modification", "Performance", "Persuasion", "SavingThrows", "Value" },
values: new object[,]
{
{ 1, false, true, true, false, false, 1, 0, 1, 3, 2, 0, 0, 10 },
{ 2, true, true, true, false, true, 2, 1, 1, 5, 2, 0, 3, 11 },
{ 3, false, false, true, true, false, 3, 0, 4, -2, 2, 1, 0, 5 }
});
migrationBuilder.InsertData(
table: "Constitutions",
columns: new[] { "Id", "CanSaveThrows", "CharacterId", "Modification", "SavingThrows", "Value" },
values: new object[,]
{
{ 1, true, 1, 4, 2, 11 },
{ 2, true, 2, 4, 1, 9 },
{ 3, true, 3, 1, 2, 12 }
});
migrationBuilder.InsertData(
table: "Dexterities",
columns: new[] { "Id", "Acrobatics", "CanAcrobatics", "CanSaveThrows", "CanSleightOfHand", "CanStealth", "CharacterId", "Modification", "SavingThrows", "SleightOfHand", "Stealth", "Value" },
values: new object[,]
{
{ 2, 1, true, true, true, true, 2, 2, 2, 2, 2, 11 },
{ 3, 0, false, true, true, true, 3, 0, 2, 1, 2, 5 },
{ 1, 3, true, true, true, true, 1, 1, 4, 1, 2, 10 }
});
migrationBuilder.InsertData(
table: "Intelligences",
columns: new[] { "Id", "Arcana", "CanArcana", "CanHistory", "CanInvestigation", "CanNature", "CanReligion", "CanSaveThrows", "CharacterId", "History", "Investigation", "Modification", "Nature", "Religion", "SavingThrows", "Value" },
values: new object[,]
{
{ 1, 1, true, true, false, true, true, true, 1, 4, 0, -2, 1, 3, 1, 6 },
{ 2, 1, true, true, false, false, true, true, 2, 1, 0, 0, 0, 3, 1, 10 },
{ 3, 2, true, false, false, true, true, true, 3, 0, 0, 2, 2, 2, 1, 10 }
});
migrationBuilder.InsertData(
table: "Strengths",
columns: new[] { "Id", "Athletics", "CanAthletics", "CanSaveThrows", "CharacterId", "Modification", "SavingThrows", "Value" },
values: new object[,]
{
{ 1, 2, true, false, 1, 1, 0, 10 },
{ 2, 2, true, true, 2, 3, 2, 11 },
{ 3, 1, true, true, 3, 0, 2, 5 }
});
migrationBuilder.InsertData(
table: "Wisdoms",
columns: new[] { "Id", "AnimalHandling", "CanAnimalHandling", "CanInsight", "CanMedicine", "CanPerception", "CanSaveThrows", "CanSurvival", "CharacterId", "Insight", "Medicine", "Modification", "Perception", "SavingThrows", "Survival", "Value" },
values: new object[,]
{
{ 2, 2, true, true, false, true, true, true, 2, 2, 0, 2, 2, 1, 6, 9 },
{ 1, 2, true, true, false, true, true, true, 1, 1, 0, 3, 5, 1, 2, 11 },
{ 3, 0, false, true, true, true, true, true, 3, 1, 2, -3, 5, 1, 2, 6 }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Charismas",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Charismas",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Charismas",
keyColumn: "Id",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Constitutions",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Constitutions",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Constitutions",
keyColumn: "Id",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Dexterities",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Dexterities",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Dexterities",
keyColumn: "Id",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Intelligences",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Intelligences",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Intelligences",
keyColumn: "Id",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Strengths",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Strengths",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Strengths",
keyColumn: "Id",
keyValue: 3);
migrationBuilder.DeleteData(
table: "Wisdoms",
keyColumn: "Id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "Wisdoms",
keyColumn: "Id",
keyValue: 2);
migrationBuilder.DeleteData(
table: "Wisdoms",
keyColumn: "Id",
keyValue: 3);
}
}
}

View File

@ -888,6 +888,59 @@ namespace SessionCompanion.Database.Migrations
.IsUnique();
b.ToTable("Charismas");
b.HasData(
new
{
Id = 1,
CanDeception = false,
CanIntimidation = true,
CanPerformance = true,
CanPersuasion = false,
CanSaveThrows = false,
CharacterId = 1,
Deception = 0,
Intimidation = 1,
Modification = 3,
Performance = 2,
Persuasion = 0,
SavingThrows = 0,
Value = 10
},
new
{
Id = 2,
CanDeception = true,
CanIntimidation = true,
CanPerformance = true,
CanPersuasion = false,
CanSaveThrows = true,
CharacterId = 2,
Deception = 1,
Intimidation = 1,
Modification = 5,
Performance = 2,
Persuasion = 0,
SavingThrows = 3,
Value = 11
},
new
{
Id = 3,
CanDeception = false,
CanIntimidation = false,
CanPerformance = true,
CanPersuasion = true,
CanSaveThrows = false,
CharacterId = 3,
Deception = 0,
Intimidation = 4,
Modification = -2,
Performance = 2,
Persuasion = 1,
SavingThrows = 0,
Value = 5
});
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Class", b =>
@ -950,6 +1003,35 @@ namespace SessionCompanion.Database.Migrations
.IsUnique();
b.ToTable("Constitutions");
b.HasData(
new
{
Id = 1,
CanSaveThrows = true,
CharacterId = 1,
Modification = 4,
SavingThrows = 2,
Value = 11
},
new
{
Id = 2,
CanSaveThrows = true,
CharacterId = 2,
Modification = 4,
SavingThrows = 1,
Value = 9
},
new
{
Id = 3,
CanSaveThrows = true,
CharacterId = 3,
Modification = 1,
SavingThrows = 2,
Value = 12
});
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Dexterity", b =>
@ -998,6 +1080,53 @@ namespace SessionCompanion.Database.Migrations
.IsUnique();
b.ToTable("Dexterities");
b.HasData(
new
{
Id = 1,
Acrobatics = 3,
CanAcrobatics = true,
CanSaveThrows = true,
CanSleightOfHand = true,
CanStealth = true,
CharacterId = 1,
Modification = 1,
SavingThrows = 4,
SleightOfHand = 1,
Stealth = 2,
Value = 10
},
new
{
Id = 2,
Acrobatics = 1,
CanAcrobatics = true,
CanSaveThrows = true,
CanSleightOfHand = true,
CanStealth = true,
CharacterId = 2,
Modification = 2,
SavingThrows = 2,
SleightOfHand = 2,
Stealth = 2,
Value = 11
},
new
{
Id = 3,
Acrobatics = 0,
CanAcrobatics = false,
CanSaveThrows = true,
CanSleightOfHand = true,
CanStealth = true,
CharacterId = 3,
Modification = 0,
SavingThrows = 2,
SleightOfHand = 1,
Stealth = 2,
Value = 5
});
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Intelligence", b =>
@ -1058,6 +1187,65 @@ namespace SessionCompanion.Database.Migrations
.IsUnique();
b.ToTable("Intelligences");
b.HasData(
new
{
Id = 1,
Arcana = 1,
CanArcana = true,
CanHistory = true,
CanInvestigation = false,
CanNature = true,
CanReligion = true,
CanSaveThrows = true,
CharacterId = 1,
History = 4,
Investigation = 0,
Modification = -2,
Nature = 1,
Religion = 3,
SavingThrows = 1,
Value = 6
},
new
{
Id = 2,
Arcana = 1,
CanArcana = true,
CanHistory = true,
CanInvestigation = false,
CanNature = false,
CanReligion = true,
CanSaveThrows = true,
CharacterId = 2,
History = 1,
Investigation = 0,
Modification = 0,
Nature = 0,
Religion = 3,
SavingThrows = 1,
Value = 10
},
new
{
Id = 3,
Arcana = 2,
CanArcana = true,
CanHistory = false,
CanInvestigation = false,
CanNature = true,
CanReligion = true,
CanSaveThrows = true,
CharacterId = 3,
History = 0,
Investigation = 0,
Modification = 2,
Nature = 2,
Religion = 2,
SavingThrows = 1,
Value = 10
});
});
modelBuilder.Entity("SessionCompanion.Database.Tables.OtherEquipment", b =>
@ -7611,6 +7799,41 @@ namespace SessionCompanion.Database.Migrations
.IsUnique();
b.ToTable("Strengths");
b.HasData(
new
{
Id = 1,
Athletics = 2,
CanAthletics = true,
CanSaveThrows = false,
CharacterId = 1,
Modification = 1,
SavingThrows = 0,
Value = 10
},
new
{
Id = 2,
Athletics = 2,
CanAthletics = true,
CanSaveThrows = true,
CharacterId = 2,
Modification = 3,
SavingThrows = 2,
Value = 11
},
new
{
Id = 3,
Athletics = 1,
CanAthletics = true,
CanSaveThrows = true,
CharacterId = 3,
Modification = 0,
SavingThrows = 2,
Value = 5
});
});
modelBuilder.Entity("SessionCompanion.Database.Tables.User", b =>
@ -8240,6 +8463,65 @@ namespace SessionCompanion.Database.Migrations
.IsUnique();
b.ToTable("Wisdoms");
b.HasData(
new
{
Id = 1,
AnimalHandling = 2,
CanAnimalHandling = true,
CanInsight = true,
CanMedicine = false,
CanPerception = true,
CanSaveThrows = true,
CanSurvival = true,
CharacterId = 1,
Insight = 1,
Medicine = 0,
Modification = 3,
Perception = 5,
SavingThrows = 1,
Survival = 2,
Value = 11
},
new
{
Id = 2,
AnimalHandling = 2,
CanAnimalHandling = true,
CanInsight = true,
CanMedicine = false,
CanPerception = true,
CanSaveThrows = true,
CanSurvival = true,
CharacterId = 2,
Insight = 2,
Medicine = 0,
Modification = 2,
Perception = 2,
SavingThrows = 1,
Survival = 6,
Value = 9
},
new
{
Id = 3,
AnimalHandling = 0,
CanAnimalHandling = false,
CanInsight = true,
CanMedicine = true,
CanPerception = true,
CanSaveThrows = true,
CanSurvival = true,
CharacterId = 3,
Insight = 1,
Medicine = 2,
Modification = -3,
Perception = 5,
SavingThrows = 1,
Survival = 2,
Value = 6
});
});
modelBuilder.Entity("SessionCompanion.Database.Tables.Biography", b =>