32 lines
688 B
PHP
32 lines
688 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Employee;
|
|
use App\Models\Gift;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<Gift>
|
|
*/
|
|
class GiftFactory extends Factory
|
|
{
|
|
protected $model = Gift::class;
|
|
|
|
/**
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'employee_id' => Employee::factory(),
|
|
'gift_date' => fake()->dateTimeBetween('-1 year', 'now'),
|
|
'gift_name' => fake()->words(3, true),
|
|
'value' => fake()->randomFloat(2, 50, 1000),
|
|
'reason' => fake()->optional()->sentence(),
|
|
];
|
|
}
|
|
}
|