simedkom/database/migrations/2025_02_25_024741_create_companies_table.php
myuqinurrohman 63d01d90a2 feat: process edit and accept account company
chore: show company
2025-04-09 15:15:02 +07:00

58 lines
2.2 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->string('name');
$table->string('email');
$table->text('address');
$table->string('director_name');
$table->string('director_nik');
$table->string('director_nik_doc')->nullable();
$table->string('deed_incorporation')->nullable();
$table->string('deed_incorporation_doc')->nullable();
$table->string('trade_license')->nullable();
$table->string('trade_license_doc')->nullable();
$table->string('tax_id_number')->nullable();
$table->string('tax_id_number_doc')->nullable();
$table->string('taxable_enterprise')->nullable();
$table->string('taxable_enterprise_doc')->nullable();
$table->string('annual_tax_return')->nullable();
$table->string('annual_tax_return_doc')->nullable();
$table->string('domicile_certificate')->nullable();
$table->string('domicile_certificate_doc')->nullable();
$table->string('profile')->nullable();
$table->string('profile_doc')->nullable();
$table->string('cooperation_request')->nullable();
$table->string('cooperation_request_doc')->nullable();
$table->text('edit_description')->nullable();
$table->enum('edit_status', ['0', '1', '2', '3'])->default('0');
$table->text('edit_rejection_reason')->nullable();
$table->date('validated_at')->nullable();
$table->text('rejection_reason')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('companies');
}
};