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:
@@ -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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user