- Migration 013: loot_profiles table (JSONB loot_table + loot_groups, license-scoped) - TypeORM entity matching migration schema exactly - NestJS loot module: 10 endpoints (CRUD, duplicate, apply, import, export, containers) - Multiplier logic recursively scales Min/Max/Scrap across loot tables and groups - Apply-to-server writes BetterLoot JSON via NATS file manager + RCON reload - Frontend static data: 191 Rust items, 51 container prefabs - TypeScript types for BetterLoot data model (PrefabLoot, LootEntry, LootRNG, etc.) - Fix vue-tsc errors: UngroupedItems uses LootRNG, null safety in store/view Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14 lines
566 B
SQL
14 lines
566 B
SQL
-- Loot profiles for BetterLoot integration
|
|
CREATE TABLE loot_profiles (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
license_id UUID NOT NULL REFERENCES licenses(id) ON DELETE CASCADE,
|
|
profile_name VARCHAR(100) NOT NULL,
|
|
description TEXT,
|
|
loot_table JSONB NOT NULL DEFAULT '{}',
|
|
loot_groups JSONB NOT NULL DEFAULT '{}',
|
|
is_active BOOLEAN NOT NULL DEFAULT false,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
CREATE INDEX idx_loot_profiles_license ON loot_profiles(license_id);
|