Eldorado : Added the minimum stock threshold
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 3m25s
Test, build and push image to registry / build-image (push) Successful in 2m59s

It now look at all of the offers of the first page and select the one matching the criterias
This commit is contained in:
2025-12-20 16:20:07 +01:00
parent 48fdc2f6f0
commit 5e6164016c
5 changed files with 223 additions and 48 deletions

View File

@@ -0,0 +1,37 @@
<?php
use App\Models\Job;
use App\Models\JobInfo;
use App\Models\JobInfoType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$eldoradoJob = Job::where("name", "Eldorado Robux Price Sentry")->first();
JobInfo::forceCreate([
"key" => "eldorado_stock_quantity_threshold",
"name" => "Seuil de quantité de robux en stock",
"description" => "Le seuil de quantité de robux en stock pour déclencher une alerte.",
"placeholder" => "10000",
"is_required" => false,
"job_info_type_id" => JobInfoType::where("name", "number")->first()->id,
"job_id" => $eldoradoJob->id,
]);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
JobInfo::where("key", "eldorado_stock_quantity_threshold")->delete();
}
};