32 lines
930 B
PHP
32 lines
930 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\GiftVoucher>
|
|
*/
|
|
class GiftVoucherFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'code' => strtoupper('GIFT-'.$this->faker->bothify('##??##??')),
|
|
'amount' => $this->faker->randomElement([29, 59, 129, 149]),
|
|
'currency' => 'EUR',
|
|
'status' => \App\Models\GiftVoucher::STATUS_ISSUED,
|
|
'purchaser_email' => $this->faker->safeEmail(),
|
|
'recipient_email' => $this->faker->safeEmail(),
|
|
'recipient_name' => $this->faker->name(),
|
|
'message' => $this->faker->sentence(8),
|
|
'expires_at' => now()->addYears(5),
|
|
];
|
|
}
|
|
}
|