mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10:41 -05:00
move disabled property
This commit is contained in:
parent
a1ae15fb67
commit
5fe0541593
@ -30,13 +30,21 @@ class ModFactory extends Factory
|
||||
'featured' => fake()->boolean(),
|
||||
'contains_ai_content' => fake()->boolean(),
|
||||
'contains_ads' => fake()->boolean(),
|
||||
'disabled' => fake()->boolean(),
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
'published_at' => now()->subHours(3),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the mod should be disabled.
|
||||
*/
|
||||
public function disabled(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'disabled' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the mod should be soft-deleted.
|
||||
*/
|
||||
|
@ -22,10 +22,18 @@ class ModVersionFactory extends Factory
|
||||
'spt_version_id' => SptVersion::factory(),
|
||||
'virus_total_link' => fake()->url(),
|
||||
'downloads' => fake()->randomNumber(),
|
||||
'disabled' => fake()->boolean(),
|
||||
'created_at' => Carbon::now()->subDays(rand(0, 365))->subHours(rand(0, 23)),
|
||||
'updated_at' => Carbon::now()->subDays(rand(0, 365))->subHours(rand(0, 23)),
|
||||
'published_at' => Carbon::now()->subDays(rand(0, 100))->addDays(rand(0, 365))->subHours(rand(0, 23))->addHours(rand(0, 23)),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the mod version should be disabled.
|
||||
*/
|
||||
public function disabled(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'disabled' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user