id('PerusahaanId'); $table->string('NomorInduk')->nullable(); $table->unsignedBigInteger('JenisKegiatanId'); $table->foreign('JenisKegiatanId')->references('JenisKegiatanId')->on('JenisKegiatan')->onDelete('cascade'); $table->string('NamaPerusahaan'); $table->string('Alamat')->nullable(); $table->unsignedBigInteger('KelurahanId'); $table->foreign('KelurahanId')->references('KelurahanId')->on('Kelurahan')->onDelete('cascade'); $table->string('KodePos')->nullable(); $table->string('Telepon')->nullable(); $table->string('Fax')->nullable(); $table->string('Email')->nullable(); $table->string('Lintang')->nullable(); $table->string('Bujur')->nullable(); $table->string('CPNama')->nullable(); $table->string('CPTelepon')->nullable(); $table->string('ILNomor')->nullable(); $table->string('ILTanggal')->nullable(); $table->unsignedBigInteger('JenisDokILId'); $table->foreign('JenisDokILId')->references('JenisDokILId')->on('JenisDokIL')->onDelete('cascade'); $table->unsignedBigInteger('VerifikatorId'); $table->foreign('VerifikatorId')->references('VerifikatorId')->on('Verifikator')->onDelete('cascade'); $table->boolean('ReportLocked')->default(1); $table->boolean('IsPublish')->default(0); $table->string('ILDokumen')->nullable(); $table->string('ILPdlNomor')->default('n')->comment('Dok IL versi PDL'); $table->unsignedInteger('ILPdlJenis')->nullable()->comment('id dari refjenisdokil'); $table->foreign('ILPdlJenis')->references('JenisDokILId')->on('JenisDokIL')->onDelete('set null'); $table->string('DocPdlOrig')->nullable()->comment('nama file original'); $table->string('DocPdlHash')->nullable()->comment('nama file hash'); $table->string('DocPdlPath')->nullable()->comment('upload path'); $table->date('ILPdlTanggal')->nullable(); $table->unsignedInteger('Kawasan')->nullable()->comment('id dari perusahaan, digunakan utk pengelola kawasan'); $table->foreign('Kawasan')->references('PerusahaanId')->on('Perusahaan')->onDelete('set null'); $table->timestamps(); $table->index('NomorInduk', 'IndexNomorInduk'); $table->index('KelurahanId', 'IndexKelurahanId'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('Perusahaan'); } };