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