geschenkgutscheine implementiert ("Paket verschenken"). Neuer Upload-Provider: Sparkbooth.
This commit is contained in:
31
database/factories/GiftVoucherFactory.php
Normal file
31
database/factories/GiftVoucherFactory.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user