Bug fixes and Action / Decision seeder

This commit is contained in:
Simon Pocrnjič
2024-11-14 22:01:43 +01:00
parent ad8b3c07e1
commit 7329a5f7d8
4 changed files with 125 additions and 12 deletions
+113 -1
View File
@@ -2,6 +2,8 @@
namespace Database\Seeders;
use App\Models\Action;
use App\Models\Decision;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
@@ -12,6 +14,116 @@ class ActionSeeder extends Seeder
*/
public function run(): void
{
//
Action::create([
'name' => 'KLIC - IZHODNI',
'color_tag' => '',
'segment_id' => 1
]);
Action::create([
'name' => 'KLIC - VHODNI',
'color_tag' => '',
'segment_id' => 1
]);
Action::create([
'name' => 'ePOŠTA',
'color_tag' => '',
'segment_id' => 1
]);
Action::create([
'name' => 'VROČANJE',
'color_tag' => '',
'segment_id' => 1
]);
Action::create([
'name' => 'SMS',
'color_tag' => '',
'segment_id' => 1
]);
//------- 1
Decision::create([
'name' => 'Obljuba',
'color_tag' => '',
]);
\DB::table('action_decision')->insert([
'action_id' => 1,
'decision_id' => 1
]);
\DB::table('action_decision')->insert([
'action_id' => 2,
'decision_id' => 1
]);
//------- 2
Decision::create([
'name' => 'Poslana',
'color_tag' => '',
]);
\DB::table('action_decision')->insert([
'action_id' => 3,
'decision_id' => 2
]);
//-------- 3
Decision::create([
'name' => 'Prejeta',
'color_tag' => '',
]);
\DB::table('action_decision')->insert([
'action_id' => 3,
'decision_id' => 3
]);
//--------- 4
Decision::create([
'name' => 'Neuspešna',
'color_tag' => '',
]);
\DB::table('action_decision')->insert([
'action_id' => 4,
'decision_id' => 4
]);
//--------- 5
Decision::create([
'name' => 'Uspešna',
'color_tag' => '',
]);
\DB::table('action_decision')->insert([
'action_id' => 4,
'decision_id' => 5
]);
//--------- 6
Decision::create([
'name' => 'Poslan SMS',
'color_tag' => '',
]);
\DB::table('action_decision')->insert([
'action_id' => 5,
'decision_id' => 6
]);
//--------- 7
Decision::create([
'name' => 'Prejet SMS',
'color_tag' => '',
]);
\DB::table('action_decision')->insert([
'action_id' => 5,
'decision_id' => 7
]);
}
}