This commit is contained in:
gamer147
2026-05-25 12:03:47 -04:00
parent d067f8a64a
commit 558e8288eb
44 changed files with 6512 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,116 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SVSim.Database.Migrations
{
/// <inheritdoc />
public partial class AddBasicPuzzle : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PuzzleGroups",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false),
PuzzleMasterId = table.Column<int>(type: "integer", nullable: false),
BasicTitleTextId = table.Column<string>(type: "text", nullable: false),
PuzzleCharaId = table.Column<int>(type: "integer", nullable: false),
CharaId = table.Column<int>(type: "integer", nullable: false),
SortType = table.Column<int>(type: "integer", nullable: false),
DifficultyNameListJson = table.Column<string>(type: "text", nullable: false),
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PuzzleGroups", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PuzzleMissions",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false),
MissionName = table.Column<string>(type: "text", nullable: false),
AchievedMessage = table.Column<string>(type: "text", nullable: false),
RequireNumber = table.Column<int>(type: "integer", nullable: false),
CampaignCommenceTime = table.Column<long>(type: "bigint", nullable: false),
OrderId = table.Column<int>(type: "integer", nullable: false),
RewardType = table.Column<int>(type: "integer", nullable: false),
RewardDetailId = table.Column<long>(type: "bigint", nullable: false),
RewardNumber = table.Column<int>(type: "integer", nullable: false),
TargetPuzzleGroupId = table.Column<int>(type: "integer", nullable: true),
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PuzzleMissions", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ViewerPuzzleClears",
columns: table => new
{
ViewerId = table.Column<long>(type: "bigint", nullable: false),
PuzzleId = table.Column<int>(type: "integer", nullable: false),
ClearedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
BestRetryCount = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ViewerPuzzleClears", x => new { x.ViewerId, x.PuzzleId });
});
migrationBuilder.CreateTable(
name: "Puzzles",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false),
PuzzleId = table.Column<int>(type: "integer", nullable: false),
GroupId = table.Column<int>(type: "integer", nullable: false),
PuzzleDifficulty = table.Column<int>(type: "integer", nullable: false),
IsAdditional = table.Column<bool>(type: "boolean", nullable: false),
IsPlayable = table.Column<bool>(type: "boolean", nullable: false),
ReleaseConditionTextId = table.Column<string>(type: "text", nullable: false),
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Puzzles", x => x.Id);
table.ForeignKey(
name: "FK_Puzzles_PuzzleGroups_GroupId",
column: x => x.GroupId,
principalTable: "PuzzleGroups",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Puzzles_GroupId",
table: "Puzzles",
column: "GroupId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PuzzleMissions");
migrationBuilder.DropTable(
name: "Puzzles");
migrationBuilder.DropTable(
name: "ViewerPuzzleClears");
migrationBuilder.DropTable(
name: "PuzzleGroups");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SVSim.Database.Migrations
{
/// <inheritdoc />
public partial class AddDeckMyRotationId : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "MyRotationId",
table: "Decks",
type: "text",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "MyRotationId",
table: "Decks");
}
}
}

View File

@@ -976,6 +976,124 @@ namespace SVSim.Database.Migrations
b.ToTable("PreReleaseInfos");
});
modelBuilder.Entity("SVSim.Database.Models.PuzzleEntry", b =>
{
b.Property<int>("Id")
.HasColumnType("integer");
b.Property<DateTime>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("timestamp with time zone");
b.Property<int>("GroupId")
.HasColumnType("integer");
b.Property<bool>("IsAdditional")
.HasColumnType("boolean");
b.Property<bool>("IsPlayable")
.HasColumnType("boolean");
b.Property<int>("PuzzleDifficulty")
.HasColumnType("integer");
b.Property<int>("PuzzleId")
.HasColumnType("integer");
b.Property<string>("ReleaseConditionTextId")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("GroupId");
b.ToTable("Puzzles");
});
modelBuilder.Entity("SVSim.Database.Models.PuzzleGroupEntry", b =>
{
b.Property<int>("Id")
.HasColumnType("integer");
b.Property<string>("BasicTitleTextId")
.IsRequired()
.HasColumnType("text");
b.Property<int>("CharaId")
.HasColumnType("integer");
b.Property<DateTime>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("timestamp with time zone");
b.Property<string>("DifficultyNameListJson")
.IsRequired()
.HasColumnType("text");
b.Property<int>("PuzzleCharaId")
.HasColumnType("integer");
b.Property<int>("PuzzleMasterId")
.HasColumnType("integer");
b.Property<int>("SortType")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("PuzzleGroups");
});
modelBuilder.Entity("SVSim.Database.Models.PuzzleMissionEntry", b =>
{
b.Property<int>("Id")
.HasColumnType("integer");
b.Property<string>("AchievedMessage")
.IsRequired()
.HasColumnType("text");
b.Property<long>("CampaignCommenceTime")
.HasColumnType("bigint");
b.Property<DateTime>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("timestamp with time zone");
b.Property<string>("MissionName")
.IsRequired()
.HasColumnType("text");
b.Property<int>("OrderId")
.HasColumnType("integer");
b.Property<int>("RequireNumber")
.HasColumnType("integer");
b.Property<long>("RewardDetailId")
.HasColumnType("bigint");
b.Property<int>("RewardNumber")
.HasColumnType("integer");
b.Property<int>("RewardType")
.HasColumnType("integer");
b.Property<int?>("TargetPuzzleGroupId")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("PuzzleMissions");
});
modelBuilder.Entity("SVSim.Database.Models.RankInfoEntry", b =>
{
b.Property<int>("Id")
@@ -1200,6 +1318,9 @@ namespace SVSim.Database.Migrations
b.Property<int>("LeaderSkinId")
.HasColumnType("integer");
b.Property<string>("MyRotationId")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
@@ -1347,6 +1468,25 @@ namespace SVSim.Database.Migrations
b.ToTable("Viewers");
});
modelBuilder.Entity("SVSim.Database.Models.ViewerPuzzleClear", b =>
{
b.Property<long>("ViewerId")
.HasColumnType("bigint");
b.Property<int>("PuzzleId")
.HasColumnType("integer");
b.Property<int>("BestRetryCount")
.HasColumnType("integer");
b.Property<DateTime>("ClearedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("ViewerId", "PuzzleId");
b.ToTable("ViewerPuzzleClears");
});
modelBuilder.Entity("SleeveEntryViewer", b =>
{
b.Property<int>("SleevesId")
@@ -1546,6 +1686,17 @@ namespace SVSim.Database.Migrations
b.Navigation("GachaPointConfig");
});
modelBuilder.Entity("SVSim.Database.Models.PuzzleEntry", b =>
{
b.HasOne("SVSim.Database.Models.PuzzleGroupEntry", "Group")
.WithMany("Puzzles")
.HasForeignKey("GroupId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Group");
});
modelBuilder.Entity("SVSim.Database.Models.ShadowverseCardEntry", b =>
{
b.HasOne("SVSim.Database.Models.ClassEntry", "Class")
@@ -1993,6 +2144,11 @@ namespace SVSim.Database.Migrations
b.Navigation("LeaderSkins");
});
modelBuilder.Entity("SVSim.Database.Models.PuzzleGroupEntry", b =>
{
b.Navigation("Puzzles");
});
modelBuilder.Entity("SVSim.Database.Models.ShadowverseCardSetEntry", b =>
{
b.Navigation("Cards");