Eldorado : Added the minimum stock threshold
It now look at all of the offers of the first page and select the one matching the criterias
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user