Lots of changes
This commit is contained in:
@@ -15,7 +15,7 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('name',50);
|
||||
$table->string('description',125)->nullable();
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
@@ -24,7 +24,8 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('name',50);
|
||||
$table->string('description',125)->nullable();
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->string('color_tag', 50)->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
@@ -33,7 +34,7 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('name',50);
|
||||
$table->string('description',125)->nullable();
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
@@ -42,7 +43,7 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('name',50);
|
||||
$table->string('description',125)->nullable();
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
@@ -62,7 +63,7 @@ public function up(): void
|
||||
$table->foreignId('group_id')->references('id')->on('person_groups');
|
||||
$table->foreignId('type_id')->references('id')->on('person_types');
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->foreignIdFor(\App\Models\User::class);
|
||||
$table->timestamps();
|
||||
});
|
||||
@@ -75,7 +76,7 @@ public function up(): void
|
||||
$table->string('description',125)->nullable();
|
||||
$table->foreignIdFor(\App\Models\Person\Person::class);
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->foreignIdFor(\App\Models\User::class);
|
||||
$table->timestamps();
|
||||
|
||||
@@ -89,7 +90,7 @@ public function up(): void
|
||||
$table->string('description',125)->nullable();
|
||||
$table->foreignIdFor(\App\Models\Person\Person::class);
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->foreignIdFor(\App\Models\User::class);
|
||||
$table->timestamps();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('name',50);
|
||||
$table->string('description',125)->nullable();
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
@@ -27,7 +27,7 @@ public function up(): void
|
||||
$table->foreignIdFor(\App\Models\Contract::class);
|
||||
$table->foreignId('type_id')->references('id')->on('account_types');
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('name',50)->unique();
|
||||
$table->string('description',125)->nullable();
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
@@ -34,7 +34,7 @@ public function up(): void
|
||||
$table->foreignId('account_id')->references('id')->on('accounts');
|
||||
$table->foreignId('type_id')->references('id')->on('debt_types');
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('name',50);
|
||||
$table->string('description',125)->nullable();
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
@@ -30,7 +30,7 @@ public function up(): void
|
||||
$table->foreignId('debt_id')->references('id')->on('debts');
|
||||
$table->foreignId('type_id')->references('id')->on('payment_types');
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->foreignIdFor(\App\Models\User::class);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('name',50);
|
||||
$table->string('description',125)->nullable();
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
@@ -27,11 +27,10 @@ public function up(): void
|
||||
$table->date('start_date');
|
||||
$table->date('end_date')->nullable();
|
||||
$table->string('description', 255)->nullable();
|
||||
$table->foreignIdFor(\App\Models\Person\Person::class, 'client_id');
|
||||
$table->foreignIdFor(\App\Models\Person\Person::class, 'debtor_id');
|
||||
$table->foreignIdFor(\App\Models\ClientCase::class);
|
||||
$table->foreignId('type_id')->references('id')->on('contract_types');
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->unsignedTinyInteger('deleted')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('clients', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid()->unique();
|
||||
$table->foreignIdFor(\App\Models\Person\Person::class);
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('clients');
|
||||
}
|
||||
};
|
||||
@@ -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_cases', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid()->unique();
|
||||
$table->foreignIdFor(\App\Models\Client::class);
|
||||
$table->foreignIdFor(\App\Models\Person\Person::class);
|
||||
$table->unsignedTinyInteger('active')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('client_cases');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('activities', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->date('due_date')->nullable();
|
||||
$table->decimal('amount', 4)->nullable();
|
||||
$table->text('note')->default('');
|
||||
$table->foreignIdFor(\App\Models\Action::class);
|
||||
$table->foreignIdFor(\App\Models\Decision::class);
|
||||
$table->foreignIdFor(\App\Models\ClientCase::class);
|
||||
$table->foreignIdFor(\App\Models\Contract::class)->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('activities');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('actions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 125);
|
||||
$table->string('color_tag', 55)->nullable();
|
||||
$table->foreignIdFor(\App\Models\Segment::class);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('actions');
|
||||
}
|
||||
};
|
||||
@@ -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('decisions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 125);
|
||||
$table->string('color_tag', 55)->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('decisions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('events', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 55);
|
||||
$table->string('description', 125)->nullable();
|
||||
$table->jsonb('options');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('events');
|
||||
}
|
||||
};
|
||||
@@ -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_events', 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_events');
|
||||
}
|
||||
};
|
||||
@@ -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('action_decision', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignIdFor(\App\Models\Action::class);
|
||||
$table->foreignIdFor(\App\Models\Decision::class);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user