44 lines
1.4 KiB
PHP
44 lines
1.4 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('suppliers', function (Blueprint $table) {
|
||
|
$table->id();
|
||
|
$table->string("name");
|
||
|
$table->string("npwp");
|
||
|
$table->string("address")->nullable();
|
||
|
$table->string("phone")->nullable();
|
||
|
$table->string("email")->nullable();
|
||
|
$table->string("website")->nullable();
|
||
|
$table->string("no_rekening")->nullable();
|
||
|
$table->enum("supplier_type", ["PKP", "Non PKP"]);
|
||
|
$table->char("status", 1)->default(1);
|
||
|
$table->timestamps();
|
||
|
$table->softDeletes();
|
||
|
$table->unsignedBigInteger("created_by")->nullable();
|
||
|
$table->unsignedBigInteger("updated_by")->nullable();
|
||
|
$table->unsignedBigInteger("deleted_by")->nullable();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::dropIfExists('suppliers');
|
||
|
}
|
||
|
};
|