update api

This commit is contained in:
2026-02-20 23:52:38 +07:00
parent 1dfcf9b2f5
commit c19e39fe5e
13 changed files with 628 additions and 16 deletions
@@ -13,8 +13,8 @@ return new class extends Migration
{
Schema::create('master_provinsi', function (Blueprint $table) {
$table->id();
$table->string('kode_provinsi', 10)->unique();
$table->string('nama_provinsi', 100);
$table->string('kode', 2)->unique();
$table->string('nama', 100);
$table->string('path', 10000);
$table->string('iso', 100);
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
@@ -26,8 +26,8 @@ return new class extends Migration
Schema::create('master_kabupaten_kota', function (Blueprint $table) {
$table->id();
$table->string('kode_kabupaten_kota', 10)->unique();
$table->string('nama_kabupaten_kota', 100);
$table->string('kode', 4)->unique();
$table->string('nama', 100);
$table->string('path', 10000);
$table->foreignId('provinsi_id')->constrained('master_provinsi')->onDelete('set null');
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
@@ -39,8 +39,8 @@ return new class extends Migration
Schema::create('master_kecamatan', function (Blueprint $table) {
$table->id();
$table->string('kode_kecamatan', 10)->unique();
$table->string('nama_kecamatan', 100);
$table->string('kode', 6)->unique();
$table->string('nama', 100);
$table->string('path', 10000);
$table->foreignId('kabupaten_kota_id')->constrained('master_kabupaten_kota')->onDelete('set null');
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
@@ -52,8 +52,8 @@ return new class extends Migration
Schema::create('master_desa_kelurahan', function (Blueprint $table) {
$table->id();
$table->string('kode_desa_kelurahan', 10)->unique();
$table->string('nama_desa_kelurahan', 100);
$table->string('kode', 10)->unique();
$table->string('nama', 100);
$table->string('path', 10000);
$table->foreignId('kecamatan_id')->constrained('master_kecamatan')->onDelete('set null');
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');