mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 10:51:06 +03:30
feat: add factory for models
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Cycle;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Cycle>
|
||||
*/
|
||||
class CycleFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'unique_id' => $this->faker->uuid,
|
||||
'date' => $this->faker->date,
|
||||
'sterilizer_id' => $this->faker->uuid,
|
||||
'cycle_number' => $this->faker->numerify('Cycle-####'),
|
||||
'note' => $this->faker->word,
|
||||
'verified' => $this->faker->randomElement(['Verified', 'NotVerified']),
|
||||
'user_id' => \App\Models\User::factory(),
|
||||
];
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user