This commit is contained in:
2025-10-22 20:08:22 +05:00
commit 736e3bef18
2573 changed files with 120385 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
<?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('branches', function (Blueprint $table) {
$table->id();
$table->string('unique_code')->nullable()->unique();
$table->json('name');
$table->json('address')->nullable();
$table->string('region', 2)->index();
$table->foreignId('province_id')->nullable()->constrained('provinces')->onDelete('restrict');
$table->json('phone_numbers')->nullable();
$table->string('billing_username')->nullable();
$table->string('billing_password')->nullable();
$table->string('billing_swift_username')->nullable();
$table->string('billing_swift_password')->nullable();
$table->string('billing_visa_master_username')->nullable();
$table->string('billing_visa_master_password')->nullable();
$table->string('billing_sber_username')->nullable();
$table->string('billing_sber_password')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('branches');
}
};

View File

@@ -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('branch_user', function (Blueprint $table) {
$table->id();
$table->foreignId('branch_id')->constrained()->cascadeOnDelete();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('branch_user');
}
};