base commit
This commit is contained in:
31
database/factories/ExplanationFactory.php
Normal file
31
database/factories/ExplanationFactory.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Employee;
|
||||
use App\Models\Explanation;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Explanation>
|
||||
*/
|
||||
class ExplanationFactory extends Factory
|
||||
{
|
||||
protected $model = Explanation::class;
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'employee_id' => Employee::factory(),
|
||||
'explanation_date' => fake()->dateTimeBetween('-1 year', 'now'),
|
||||
'reason' => fake()->sentence(),
|
||||
'description' => fake()->paragraph(),
|
||||
'attachment_path' => null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user