12-05-2026 Frontend dev
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run

This commit is contained in:
Kevin Adametz 2026-05-12 18:32:33 +02:00
parent 405df0a122
commit 5b8bdf4182
779 changed files with 480564 additions and 6241 deletions

View file

@ -0,0 +1,37 @@
<?php
namespace Database\Factories;
use App\Enums\UserPaymentOptionStatus;
use App\Models\PaymentOption;
use App\Models\User;
use App\Models\UserPaymentOption;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<UserPaymentOption>
*/
class UserPaymentOptionFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'user_id' => User::factory(),
'payment_option_id' => PaymentOption::factory(),
'status' => fake()->randomElement(UserPaymentOptionStatus::cases())->value,
'grandfathered_until' => fake()->optional()->dateTimeBetween('now', '+2 years'),
'legacy_conditions' => fake()->boolean(25)
? ['note' => fake()->sentence(), 'discount_percent' => fake()->numberBetween(5, 40)]
: null,
'current_period_start' => now()->startOfMonth(),
'current_period_end' => now()->endOfMonth(),
'stripe_subscription_id' => fake()->optional()->regexify('sub_[A-Za-z0-9]{14}'),
'cancelled_at' => null,
];
}
}