mandant-crm/backend/database/factories/HistoryEntryFactory.php

26 lines
673 B
PHP
Raw Normal View History

<?php
namespace Database\Factories;
use App\Models\User;
use App\Modules\Client\Models\Client;
use App\Modules\History\Models\HistoryEntry;
use App\Modules\History\Models\HistoryEntryType;
use Illuminate\Database\Eloquent\Factories\Factory;
class HistoryEntryFactory extends Factory
{
protected $model = HistoryEntry::class;
public function definition(): array
{
return [
'client_id' => Client::factory(),
'type' => $this->faker->randomElement(HistoryEntryType::cases())->value,
'body' => $this->faker->paragraph(),
'author_id' => User::factory(),
'updated_by' => null,
];
}
}