laravel-rs/database/factories/PaymentFactory.php
Uchiha Bayu Senju 4654a2e350
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
Upload
2025-04-27 23:55:09 +07:00

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,
];
}
}