id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->foreignId('reward_id')->constrained()->cascadeOnDelete(); $table->string('code')->unique(); $table->unsignedInteger('points_spent'); $table->enum('status', RedemptionStatus::values())->default(RedemptionStatus::WAITING_PICKUP)->comment(RedemptionStatus::comment()); $table->timestamp('expires_at'); $table->timestamp('verified_at')->nullable(); $table->foreignId('verified_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamp('created_at')->useCurrent(); $table->timestamp('updated_at')->nullable()->useCurrentOnUpdate(); $table->softDeletes(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('redemptions'); } };