feat(customers): tambahkan model dan migrasi untuk tabel customers

- Menambahkan model Customer dengan relasi ke akun dan cabang.
- Membuat migrasi untuk tabel customers dengan kolom yang diperlukan.
This commit is contained in:
Daeng Deni Mardaeni
2025-02-18 16:31:53 +07:00
parent 3986b35c25
commit 1b8c32a84d
2 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?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('customers', function (Blueprint $table) {
$table->id();
$table->string('customer_code')->unique();
$table->string('name')->nullable();
$table->text('address')->nullable();
$table->string('branch_code')->nullable();
$table->string('date_of_birth')->nullable();
$table->string('email')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('customers');
}
};