diff --git a/app/Listeners/V3/Dashboard/Mission/SendDataToFMSListener.php b/app/Listeners/V3/Dashboard/Mission/SendDataToFMSListener.php index 10020734..1d0b249b 100644 --- a/app/Listeners/V3/Dashboard/Mission/SendDataToFMSListener.php +++ b/app/Listeners/V3/Dashboard/Mission/SendDataToFMSListener.php @@ -2,6 +2,7 @@ namespace App\Listeners\V3\Dashboard\Mission; +use App\Enums\FMSResultCode; use App\Events\V3\Dashboard\Mission\SendDataToFMSEvent; use App\Services\FMS\GetErrorRateService; use Exception; @@ -44,6 +45,8 @@ class SendDataToFMSListener implements ShouldQueue 'first_enter' => $responseData['firstEnter'], 'last_exit' => $responseData['lastExit'], 'point_number_sent' => $responseData['noOfPointsInMission'], + 'fms_result_code' => $responseData['resultCode'], + 'fms_result_message' => FMSResultCode::name($responseData['resultCode']), ]); } } diff --git a/database/migrations/2025_09_23_095848_add_column_to_missions_table.php b/database/migrations/2025_09_23_095848_add_column_to_missions_table.php index b293d255..a69e92dc 100644 --- a/database/migrations/2025_09_23_095848_add_column_to_missions_table.php +++ b/database/migrations/2025_09_23_095848_add_column_to_missions_table.php @@ -14,9 +14,11 @@ return new class extends Migration Schema::table('missions', function (Blueprint $table) { $table->bigInteger('mission_duration')->nullable(); $table->bigInteger('in_area_duration')->nullable(); - $table->timestamps('first_enter')->nullable(); - $table->timestamps('last_exit')->nullable(); + $table->timestamp('first_enter')->nullable(); + $table->timestamp('last_exit')->nullable(); $table->integer('point_number_sent')->nullable(); + $table->smallInteger('fms_result_code')->nullable(); + $table->string('fms_result_message')->nullable(); }); } @@ -26,7 +28,11 @@ return new class extends Migration public function down(): void { Schema::table('missions', function (Blueprint $table) { - $table->dropColumn(['mission_duration', 'in_area_duration', 'first_enter', 'last_exit', 'point_number_sent']); + $table->dropColumn([ + 'mission_duration', 'in_area_duration', + 'first_enter', 'last_exit', 'point_number_sent', + 'fms_result_code', 'fms_result_message', + ]); }); } };