added full module support

This commit is contained in:
Mark Gregory
2026-06-10 12:42:07 +01:00
parent 12d4eec076
commit c59b16d791
63 changed files with 1639 additions and 131 deletions
@@ -0,0 +1,49 @@
<?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('warehouses', function (Blueprint $table): void {
$table->id();
$table->foreignId('company_id')->constrained('companies')->cascadeOnDelete();
$table->uuid('uuid')->unique();
$table->string('code');
$table->string('name');
$table->string('status')->default('active')->index();
$table->text('address')->nullable();
$table->string('timezone')->default('Europe/London');
$table->json('settings')->nullable();
$table->timestamps();
$table->unique(['company_id', 'code']);
});
Schema::create('warehouse_validation_rules', function (Blueprint $table): void {
$table->id();
$table->foreignId('warehouse_id')->constrained('warehouses')->cascadeOnDelete();
$table->string('name');
$table->string('rule_key')->index();
$table->string('severity')->default('error');
$table->boolean('is_active')->default(true)->index();
$table->json('configuration')->nullable();
$table->timestamps();
$table->unique(['warehouse_id', 'rule_key']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('warehouse_validation_rules');
Schema::dropIfExists('warehouses');
}
};