2024-05-15 00:31:24 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use App\Models\Mod;
|
|
|
|
use App\Models\ModVersion;
|
|
|
|
use App\Models\SptVersion;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
use Illuminate\Support\Carbon;
|
|
|
|
|
|
|
|
class ModVersionFactory extends Factory
|
|
|
|
{
|
|
|
|
protected $model = ModVersion::class;
|
|
|
|
|
|
|
|
public function definition(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'mod_id' => Mod::factory(),
|
|
|
|
'version' => $this->faker->numerify('1.#.#'),
|
|
|
|
'description' => $this->faker->text(),
|
2024-05-22 01:00:37 -04:00
|
|
|
'link' => $this->faker->url(),
|
2024-05-15 00:31:24 -04:00
|
|
|
'spt_version_id' => SptVersion::factory(),
|
|
|
|
'virus_total_link' => $this->faker->url(),
|
|
|
|
'downloads' => $this->faker->randomNumber(),
|
2024-05-31 17:44:52 -04:00
|
|
|
'disabled' => $this->faker->boolean,
|
2024-05-15 00:31:24 -04:00
|
|
|
'created_at' => Carbon::now(),
|
|
|
|
'updated_at' => Carbon::now(),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|