36 lines
925 B
PHP
36 lines
925 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Coupon;
|
|
use App\Models\CouponRedemption;
|
|
use App\Models\Package;
|
|
use App\Models\Tenant;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\CouponRedemption>
|
|
*/
|
|
class CouponRedemptionFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'coupon_id' => Coupon::factory(),
|
|
'package_id' => Package::factory(),
|
|
'tenant_id' => Tenant::factory(),
|
|
'user_id' => User::factory(),
|
|
'status' => CouponRedemption::STATUS_SUCCESS,
|
|
'amount_discounted' => $this->faker->randomFloat(2, 5, 150),
|
|
'currency' => 'EUR',
|
|
'redeemed_at' => now(),
|
|
];
|
|
}
|
|
}
|