lpj/database/migrations/2024_09_18_084905_create_kjpp_table.php

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.
*/
public function up(): void
{
Schema::create('kjpp', function (Blueprint $table) {
$table->id();
$table->string('code');
$table->string('name');
$table->string('jenis_kantor');
$table->string('nomor_ijin_usaha');
$table->string('province_code');
$table->string('city_code');
$table->string('district_code');
$table->string('village_code');
$table->string('address');
$table->string('postal_code');
$table->string('nomor_telepon_kantor');
$table->string('email_kantor');
$table->string('nomor_hp_pimpinan');
$table->string('nama_pic_reviewer');
$table->string('nomor_hp_pic_reviewer');
$table->string('nama_pic_admin');
$table->string('nomor_hp_pic_admin');
$table->string('nama_pic_marketing');
$table->string('nomor_hp_pic_marketing');
$table->foreignId('ijin_usaha_id')->constrained()->onDelete('cascade');
$table->foreignId('jenis_aset_id')->constrained()->onDelete('cascade');
$table->string('attachment');
$table->boolean('status')->default(true)->nullable();
$table->char('authorized_status', 1)->nullable();
$table->timestamp('authorized_at')->nullable();
$table->unsignedBigInteger('authorized_by')->nullable();
$table->softDeletes();
$table->unsignedBigInteger('deleted_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('kjpp');
}
};