39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\OfferItem;
|
|
use App\Models\OfferTemplate;
|
|
use App\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\OfferTemplate>
|
|
*/
|
|
class OfferTemplateFactory extends Factory
|
|
{
|
|
protected $model = OfferTemplate::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'branch_id' => null,
|
|
'name' => 'Vorlage ' . fake()->words(2, true),
|
|
'description' => fake()->optional()->sentence(),
|
|
'default_headline' => fake()->sentence(4),
|
|
'default_intro' => '<p>' . fake()->paragraph() . '</p>',
|
|
'default_itinerary' => null,
|
|
'default_closing' => null,
|
|
'default_items' => [
|
|
[
|
|
'type' => OfferItem::TYPE_TRAVEL,
|
|
'title' => 'Reiseleistung (Standard)',
|
|
'quantity' => 2,
|
|
'price_per_unit' => 1_250.00,
|
|
],
|
|
],
|
|
'is_active' => true,
|
|
'created_by' => User::factory(),
|
|
];
|
|
}
|
|
}
|