changes
This commit is contained in:
@@ -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');
|
||||
}
|
||||
};
|
||||
@@ -26,7 +26,8 @@ public function run(): void
|
||||
$this->call([
|
||||
PersonSeeder::class,
|
||||
SegmentSeeder::class,
|
||||
ActionSeeder::class
|
||||
ActionSeeder::class,
|
||||
EventSeeder::class
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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']
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user