This commit is contained in:
Simon Pocrnjič
2025-01-02 18:38:47 +01:00
parent 0c3bbfe18f
commit 0f8cfd3f16
41 changed files with 2013 additions and 591 deletions
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('client_case_segment', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(\App\Models\ClientCase::class)->constrained()->onDelete('cascade');
$table->foreignIdFor(\App\Models\Segment::class)->constrained()->onDelete('cascade');
$table->boolean('active')->default(true);
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('client_case_segment');
}
};
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('decision_event', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(\App\Models\Decision::class);
$table->foreignIdFor(\App\Models\Event::class);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('decision_event');
}
};
+2 -1
View File
@@ -26,7 +26,8 @@ public function run(): void
$this->call([
PersonSeeder::class,
SegmentSeeder::class,
ActionSeeder::class
ActionSeeder::class,
EventSeeder::class
]);
}
}
+8 -1
View File
@@ -2,6 +2,7 @@
namespace Database\Seeders;
use App\Models\Event;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
@@ -12,6 +13,12 @@ class EventSeeder extends Seeder
*/
public function run(): void
{
//
$events = [
[ 'name' => 'client_case.terrain.add', 'options' => json_encode([]) ]
];
foreach($events as $e) {
Event::create($e);
}
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ public function run(): void
];
$personGroups = [
[ 'name' => 'naročnik', 'description' => '', 'color_tag' => 'blue-400'],
[ 'name' => 'naročnik', 'description' => '', 'color_tag' => 'blue-500'],
[ 'name' => 'primer naročnika', 'description' => '', 'color_tag' => 'red-400']
];