change code in migration and listener
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Listeners\V3\Dashboard\Mission;
|
namespace App\Listeners\V3\Dashboard\Mission;
|
||||||
|
|
||||||
|
use App\Enums\FMSResultCode;
|
||||||
use App\Events\V3\Dashboard\Mission\SendDataToFMSEvent;
|
use App\Events\V3\Dashboard\Mission\SendDataToFMSEvent;
|
||||||
use App\Services\FMS\GetErrorRateService;
|
use App\Services\FMS\GetErrorRateService;
|
||||||
use Exception;
|
use Exception;
|
||||||
@@ -44,6 +45,8 @@ class SendDataToFMSListener implements ShouldQueue
|
|||||||
'first_enter' => $responseData['firstEnter'],
|
'first_enter' => $responseData['firstEnter'],
|
||||||
'last_exit' => $responseData['lastExit'],
|
'last_exit' => $responseData['lastExit'],
|
||||||
'point_number_sent' => $responseData['noOfPointsInMission'],
|
'point_number_sent' => $responseData['noOfPointsInMission'],
|
||||||
|
'fms_result_code' => $responseData['resultCode'],
|
||||||
|
'fms_result_message' => FMSResultCode::name($responseData['resultCode']),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ return new class extends Migration
|
|||||||
Schema::table('missions', function (Blueprint $table) {
|
Schema::table('missions', function (Blueprint $table) {
|
||||||
$table->bigInteger('mission_duration')->nullable();
|
$table->bigInteger('mission_duration')->nullable();
|
||||||
$table->bigInteger('in_area_duration')->nullable();
|
$table->bigInteger('in_area_duration')->nullable();
|
||||||
$table->timestamps('first_enter')->nullable();
|
$table->timestamp('first_enter')->nullable();
|
||||||
$table->timestamps('last_exit')->nullable();
|
$table->timestamp('last_exit')->nullable();
|
||||||
$table->integer('point_number_sent')->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
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::table('missions', function (Blueprint $table) {
|
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',
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user