30 lines
826 B
PHP
30 lines
826 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\Portal;
|
|
use App\Models\Company;
|
|
use App\Models\Contact;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<Contact>
|
|
*/
|
|
class ContactFactory extends Factory
|
|
{
|
|
protected $model = Contact::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'company_id' => Company::factory(),
|
|
'portal' => fake()->randomElement([Portal::Presseecho->value, Portal::Businessportal24->value]),
|
|
'salutation_key' => fake()->randomElement(['mr', 'mrs', null]),
|
|
'first_name' => fake()->firstName(),
|
|
'last_name' => fake()->lastName(),
|
|
'responsibility' => fake()->jobTitle(),
|
|
'phone' => fake()->phoneNumber(),
|
|
'email' => fake()->email(),
|
|
];
|
|
}
|
|
}
|