id(); $table->uuid()->unique(); $table->foreignId('scenario_id')->constrained()->onDelete('cascade'); $table->enum('type', BucketTypeEnum::values())->default(BucketTypeEnum::NEED->value); $table->string('name'); $table->integer('priority'); $table->integer('sort_order')->default(0); $table->enum('allocation_type', ['fixed_limit', 'percentage', 'unlimited']); $table->unsignedBigInteger('allocation_value')->nullable(); $table->unsignedBigInteger('starting_amount')->default(0); $table->timestamps(); // Indexes for performance $table->index(['scenario_id', 'priority']); $table->unique(['scenario_id', 'priority'], 'unique_scenario_priority'); }); } public function down(): void { Schema::dropIfExists('buckets'); } };