Add branch & province model

This commit is contained in:
nurmuhammet committed 2023-11-23 15:34:04 +05:00
1 parent 0309e8f7d8
commit fe68420bab
11 files changed
+490 -5

No files matched your search

@@ -0,0 +1,37 @@
<?php
use App\Repos\System\Settings\Location\RegionRepo;
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->jsonb('name');
$table->jsonb('address')->nullable();
$table->string('unique_code')->index()->nullable();
$table->string('region', 2)->index();
$table->foreignId('province_id')->constrained()->nullOnDelete();
$table->string('billing_username')->nullable();
$table->string('billing_password')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('branches');
}
};