create FMS service with test
This commit is contained in:
23
database/factories/AccidentFactory.php
Normal file
23
database/factories/AccidentFactory.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Accident>
|
||||
*/
|
||||
class AccidentFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'police_serial' => $this->faker->name
|
||||
];
|
||||
}
|
||||
}
|
||||
27
database/factories/ContractSubItemsFactory.php
Normal file
27
database/factories/ContractSubItemsFactory.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Contracts;
|
||||
use App\Models\Province;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ContractSubItems>
|
||||
*/
|
||||
class ContractSubItemsFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'project_title' => $this->faker->name,
|
||||
'province_id' => Province::factory(),
|
||||
'contract_id' => Contracts::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
25
database/factories/ContractsFactory.php
Normal file
25
database/factories/ContractsFactory.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Province;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Contracts>
|
||||
*/
|
||||
class ContractsFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'title' => $this->faker->name,
|
||||
'province_id' => Province::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user