Initial commit of the L'Ami Fiduciaire SaaS platform built on Laravel 12, Vue 3, Inertia.js 2, and Tailwind CSS 4. Story 0.1 (rename folders to declarations in database) is implemented and code-reviewed: migration, rollback, and 6 Pest tests all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38 lines
880 B
PHP
38 lines
880 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Client;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ClientContact>
|
|
*/
|
|
class ClientContactFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'client_id' => Client::factory(),
|
|
'full_name' => fake()->name(),
|
|
'job_title' => fake()->jobTitle(),
|
|
'email' => fake()->unique()->safeEmail(),
|
|
'phone' => fake()->phoneNumber(),
|
|
'is_principal' => false,
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Mark the contact as principal.
|
|
*/
|
|
public function principal(): static
|
|
{
|
|
return $this->state(fn () => ['is_principal' => true]);
|
|
}
|
|
}
|