feat(items): catalog import with Type + ThumbnailPath columns
ItemEntry gains Type (client item_type enum, 1=challenge, 2=card-pack ticket, 3=premium orb, 4=colosseum, 5=orb piece, 6=skin/event ticket, 7=other) and ThumbnailPath. ItemImporter mirrors PaymentItemImporter shape: find-or-create per item_id, save once, idempotent. Wired into Bootstrap.Program and SVSimTestFactory.SeedGlobalsAsync. Unblocks /item_purchase/info (filters card-pack tickets by Type==2) and any reward grant of UserGoodsType.Item, which previously threw because the catalog was empty. 466 tests pass (was 461). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
3278
SVSim.Database/Migrations/20260528013825_AddItemTypeAndThumbnail.Designer.cs
generated
Normal file
3278
SVSim.Database/Migrations/20260528013825_AddItemTypeAndThumbnail.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SVSim.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddItemTypeAndThumbnail : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ThumbnailPath",
|
||||
table: "Items",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Type",
|
||||
table: "Items",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ThumbnailPath",
|
||||
table: "Items");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Type",
|
||||
table: "Items");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1095,6 +1095,13 @@ namespace SVSim.Database.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ThumbnailPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Items");
|
||||
|
||||
Reference in New Issue
Block a user