Teren-app/database/seeders/ActionSeeder.php
2024-11-14 22:01:43 +01:00

130 lines
2.8 KiB
PHP

<?php
namespace Database\Seeders;
use App\Models\Action;
use App\Models\Decision;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class ActionSeeder extends Seeder
{
/**
* Run the database seeds.
*/
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
]);
}
}