Implement dark mode, bug report page, and schema dump
This commit is contained in:
51
database/factories/MembershipPaymentFactory.php
Normal file
51
database/factories/MembershipPaymentFactory.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Member;
|
||||
use App\Models\MembershipPayment;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class MembershipPaymentFactory extends Factory
|
||||
{
|
||||
protected $model = MembershipPayment::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'member_id' => Member::factory(),
|
||||
'paid_at' => now()->format('Y-m-d'),
|
||||
'amount' => $this->faker->numberBetween(500, 5000),
|
||||
'method' => MembershipPayment::METHOD_BANK_TRANSFER,
|
||||
'payment_method' => MembershipPayment::METHOD_BANK_TRANSFER,
|
||||
'reference' => $this->faker->bothify('REF-######'),
|
||||
'status' => MembershipPayment::STATUS_PENDING,
|
||||
'submitted_by_user_id' => null,
|
||||
'notes' => $this->faker->sentence(),
|
||||
];
|
||||
}
|
||||
|
||||
public function approvedCashier(): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'status' => MembershipPayment::STATUS_APPROVED_CASHIER,
|
||||
'cashier_verified_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function approvedAccountant(): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'status' => MembershipPayment::STATUS_APPROVED_ACCOUNTANT,
|
||||
'accountant_verified_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function approvedChair(): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'status' => MembershipPayment::STATUS_APPROVED_CHAIR,
|
||||
'chair_verified_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user