43 lines
1.3 KiB
PHP
43 lines
1.3 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.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('companies', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
|
$table->string('name', 100)->index();
|
|
$table->string('email', 254)->index();
|
|
$table->text('address');
|
|
$table->string('director_name', 100);
|
|
$table->string('director_nik', 16);
|
|
$table->string('deed_incorporation', 100);
|
|
$table->string('trade_license', 100);
|
|
$table->string('tax_id_number', 100);
|
|
$table->string('taxable_enterprise', 100);
|
|
$table->string('annual_tax_return', 100);
|
|
$table->string('domicile_certificate', 100);
|
|
$table->string('profile', 100);
|
|
$table->timestamp('created_at')->useCurrent();
|
|
$table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('companies');
|
|
}
|
|
};
|