30 lines
885 B
PHP
30 lines
885 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Registration;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Payment>
|
|
*/
|
|
class PaymentFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'registration_id' => Registration::factory(),
|
|
'total_amount' => $this->faker->randomFloat(2, 100000, 100000000),
|
|
'payment_date' => $this->faker->dateTimeBetween('-14 days', 'now'),
|
|
'payment_method' => $this->faker->randomElement(['cash', 'transfer', 'insurance', 'bpjs']),
|
|
'insurance_provider' => $this->faker->optional()->word,
|
|
'insurance_number' => $this->faker->optional()->word,
|
|
];
|
|
}
|
|
}
|