35 lines
888 B
PHP
35 lines
888 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\BazaarSubscription;
|
|
use App\Models\MobileApp;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<BazaarSubscription>
|
|
*/
|
|
class BazaarSubscriptionFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'mobile_app_id' => MobileApp::factory(),
|
|
'subscription_id' => fake()->word(),
|
|
'purchase_token' => fake()->unique()->uuid(),
|
|
'linked_subscription_token' => fake()->uuid(),
|
|
'status' => 'active',
|
|
'auto_renewing' => true,
|
|
'starts_at' => now()->subDay(),
|
|
'valid_until' => now()->addMonth(),
|
|
'validated_at' => now(),
|
|
'bazaar_response' => [],
|
|
];
|
|
}
|
|
}
|