Files
portal-api/database/migrations/2024_01_31_145201_customer.php
T
2025-07-24 16:18:27 +07:00

57 lines
1.9 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('customer', function (Blueprint $table) {
$table->id();
$table->string('firstname', 100)->nullable();
$table->string('lastname', 100)->nullable();
$table->string('avatar', 100)->nullable();
$table->integer('gender')->default(0);
$table->string('address', 100)->nullable();
$table->string('state', 100)->nullable();
$table->string('city', 100)->nullable();
$table->integer('postcode')->nullable();
$table->string('country', 100)->nullable();
$table->string('company', 100)->nullable();
$table->string('phone', 100)->unique()->nullable();
$table->string('email', 100)->unique()->nullable();
$table->string('email_verify', 100)->nullable();
$table->string('email_hash', 100)->nullable();
$table->tinyInteger('email_marketing')->default(1);
$table->tinyInteger('receive_deposit')->default(1);
$table->string('password')->nullable();
$table->integer('credit')->default(0);
$table->integer('total')->default(0);
$table->string('cccd')->nullable();
$table->string('front_cccd')->nullable();
$table->string('back_cccd')->nullable();
$table->string('remember_token', 100)->nullable();
$table->tinyInteger('status')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::dropIfExists('customer');
}
};