mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 08:21:05 +03:30
feat: add factory for models
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Label;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Model>
|
||||
*/
|
||||
class CycleLabelFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'label_id' => \App\Models\Label::factory(),
|
||||
'cycle_id' => \App\Models\Cycle::factory(),
|
||||
'count' => $this->faker->numberBetween(1, 10),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user