31 lines
815 B
PHP
31 lines
815 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\ClientCase;
|
|
use App\Models\ContractType;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Contract>
|
|
*/
|
|
class ContractFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'reference' => $this->faker->optional()->bothify('REF-####'),
|
|
'start_date' => $this->faker->date(),
|
|
'end_date' => $this->faker->optional()->date(),
|
|
'client_case_id' => ClientCase::factory(),
|
|
'type_id' => ContractType::factory(),
|
|
'description' => $this->faker->optional()->sentence(),
|
|
];
|
|
}
|
|
}
|