Dungeon Browser

This commit is contained in:
dingo
2025-12-17 15:12:56 -05:00
parent fe594fce80
commit e446cc28b6
10 changed files with 2611 additions and 15 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,64 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SystemRevivalServer.Migrations
{
/// <inheritdoc />
public partial class DungeonBrowser : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "dungeon_instances",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Tier = table.Column<int>(type: "int", nullable: false),
Seed = table.Column<int>(type: "int", nullable: false),
LevelBracketMin = table.Column<int>(type: "int", nullable: false),
LevelBracketMax = table.Column<int>(type: "int", nullable: false),
CreatorCharacterId = table.Column<ulong>(type: "bigint unsigned", nullable: false),
CreatorName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatorLevel = table.Column<int>(type: "int", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
LastActivity = table.Column<DateTime>(type: "datetime(6)", nullable: false),
PersistedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
BossKilled = table.Column<bool>(type: "tinyint(1)", nullable: false),
IsCleared = table.Column<bool>(type: "tinyint(1)", nullable: false),
MobStateJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ChestStateJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
LootChestStateJson = table.Column<string>(type: "json", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatorId = table.Column<ulong>(type: "bigint unsigned", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_dungeon_instances", x => x.Id);
table.ForeignKey(
name: "FK_dungeon_instances_dungeon_characters_CreatorId",
column: x => x.CreatorId,
principalTable: "dungeon_characters",
principalColumn: "Id");
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_dungeon_instances_CreatorId",
table: "dungeon_instances",
column: "CreatorId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "dungeon_instances");
}
}
}
+71
View File
@@ -735,6 +735,68 @@ namespace SystemRevivalServer.Migrations
b.ToTable("dungeon_mob_loot_tables");
});
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<bool>("BossKilled")
.HasColumnType("tinyint(1)");
b.Property<string>("ChestStateJson")
.HasColumnType("json");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<ulong>("CreatorCharacterId")
.HasColumnType("bigint unsigned");
b.Property<ulong?>("CreatorId")
.HasColumnType("bigint unsigned");
b.Property<int>("CreatorLevel")
.HasColumnType("int");
b.Property<string>("CreatorName")
.IsRequired()
.HasColumnType("longtext");
b.Property<bool>("IsCleared")
.HasColumnType("tinyint(1)");
b.Property<DateTime>("LastActivity")
.HasColumnType("datetime(6)");
b.Property<int>("LevelBracketMax")
.HasColumnType("int");
b.Property<int>("LevelBracketMin")
.HasColumnType("int");
b.Property<string>("LootChestStateJson")
.HasColumnType("json");
b.Property<string>("MobStateJson")
.HasColumnType("json");
b.Property<DateTime?>("PersistedAt")
.HasColumnType("datetime(6)");
b.Property<int>("Seed")
.HasColumnType("int");
b.Property<int>("Tier")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("CreatorId");
b.ToTable("dungeon_instances");
});
modelBuilder.Entity("Server.Data.Entities.DungeonSpellDefinition", b =>
{
b.Property<int>("Id")
@@ -1613,6 +1675,15 @@ namespace SystemRevivalServer.Migrations
b.Navigation("MobDefinition");
});
modelBuilder.Entity("Server.Data.Entities.DungeonPersistence", b =>
{
b.HasOne("Server.Data.Entities.DungeonCharacter", "Creator")
.WithMany()
.HasForeignKey("CreatorId");
b.Navigation("Creator");
});
modelBuilder.Entity("Server.Data.Entities.DungeonStashItem", b =>
{
b.HasOne("Server.Data.Entities.DungeonCharacter", "Character")