field job added option to add multiple contracts to user at once
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use App\Models\Segment;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Action>
|
||||
@@ -19,6 +20,7 @@ public function definition(): array
|
||||
return [
|
||||
'name' => $this->faker->unique()->words(2, true),
|
||||
'color_tag' => $this->faker->optional()->safeColorName(),
|
||||
'segment_id' => Segment::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Action;
|
||||
use App\Models\Decision;
|
||||
use App\Models\Segment;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\FieldJobSetting>
|
||||
*/
|
||||
class FieldJobSettingFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$action = Action::factory()->create();
|
||||
$decision = Decision::factory()->create();
|
||||
$segment = Segment::factory()->create();
|
||||
|
||||
return [
|
||||
'segment_id' => $segment->id,
|
||||
'initial_decision_id' => $decision->id,
|
||||
'assign_decision_id' => $decision->id,
|
||||
'complete_decision_id' => $decision->id,
|
||||
'cancel_decision_id' => $decision->id,
|
||||
'return_segment_id' => $segment->id,
|
||||
'queue_segment_id' => $segment->id,
|
||||
'action_id' => $action->id,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user