29 lines
748 B
PHP
29 lines
748 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Doctor;
|
|
use App\Models\Patient;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Registration>
|
|
*/
|
|
class RegistrationFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'patient_id' => Patient::factory(),
|
|
'doctor_id' => Doctor::factory(),
|
|
'registration_date' => $this->faker->dateTimeBetween('-14 days', 'now')->format('Y-m-d'),
|
|
'status' => $this->faker->randomElement(['waiting', 'in_progress', 'completed']),
|
|
];
|
|
}
|
|
}
|