mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
This update gives mod versions a supported SPT version field that accepts a semantic version. The latest supported SPT version will be automatically resolved based on the semvar. Next up: I need to update the ModVersion to SptVersion relationship to be a many-to-many and expand the resolution to resolve multiple versions.
24 lines
614 B
PHP
24 lines
614 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\SptVersion;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
class SptVersionFactory extends Factory
|
|
{
|
|
protected $model = SptVersion::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'version' => $this->faker->numerify('#.#.#'),
|
|
'color_class' => $this->faker->randomElement(['red', 'green', 'emerald', 'lime', 'yellow', 'grey']),
|
|
'link' => $this->faker->url,
|
|
'created_at' => Carbon::now(),
|
|
'updated_at' => Carbon::now(),
|
|
];
|
|
}
|
|
}
|