first commit

This commit is contained in:
2026-05-14 15:28:23 +08:00
commit 4fad704fd2
4034 changed files with 1093582 additions and 0 deletions

1
database/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.sqlite*

View File

@@ -0,0 +1,44 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}

View File

@@ -0,0 +1,55 @@
<?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('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('nokp')->unique();
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('alamat')->nullable();
$table->string('notelefon');
$table->string('bangsa')->nullable();
$table->enum('jantina', ['lelaki','perempuan'])->nullable();
$table->rememberToken();
$table->timestamps();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};

View File

@@ -0,0 +1,35 @@
<?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('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

View File

@@ -0,0 +1,57 @@
<?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('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};

View File

@@ -0,0 +1,47 @@
<?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('lesen_penjajas', function (Blueprint $table) {
$table->id();
$table->integer('user_id');
$table->integer('syarikat_id');
$table->enum('jenis', ['bukan kawasan berpusat','buah bermusim','food truck','foodtruck','car boot sale','berkenderaan','gerai','arked','pasar majlis','berpusat','sementara','lain-lain']);
$table->string('jenis_lain')->nullable();
$table->enum('status_tanah', ['hak milik persendirian', 'tanah kerajaan(rezab)','tanah sewa','tapak parkir','lain-lain']);
$table->string('status_lain')->nullable();
$table->string('no_petak')->nullable();
$table->integer('kawasan_id');
$table->integer('taman_id');
$table->integer('jalan_id');
$table->integer('penempatan_id');
$table->text('makanan')->nullable();
$table->text('minuman')->nullable();
$table->text('lain')->nullable();
$table->time('masa_jualan_mula')->nullable();
$table->time('masa_jualan_tamat')->nullable();
$table->enum('jenis_kenderaan', ['kereta sorong', 'basikal','motosikal','beca / basikal roda tiga','motosikal roda tiga','kereta / wagon', 'van','lori'])->nullable();
$table->string('no_pendaftaran')->nullable();
$table->string('longitude')->nullable();
$table->string('latitude')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('lesen_penjajas');
}
};

View File

@@ -0,0 +1,31 @@
<?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('lesen_penjaja_dokumens', function (Blueprint $table) {
$table->id();
$table->integer('lesen_penjaja_id');
$table->integer('dokumen_id');
$table->string('path');
$table->string('jenis_dokumen');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('lesen_penjaja_dokumens');
}
};

View File

@@ -0,0 +1,29 @@
<?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('dokumens', function (Blueprint $table) {
$table->id();
$table->enum('jenis', ['lesen_penjaja', 'lesen_pasar_malam','lesen_perniagaan']);
$table->string('nama');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('dokumens');
}
};

View File

@@ -0,0 +1,34 @@
<?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('syarikats', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->enum('jenis_perniagaan', ['milikan tunggal','perkongsian','perkongsian liabiliti terhad','sendirian berhad','berhad','koperasi','pertubuhan/persatuan/kelab']);
$table->string('nossm')->unique();
$table->string('alamat');
$table->string('notelefon')->nullable();
$table->string('bil_cawangan')->nullable();
$table->string('tarikh_luput')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('syarikats');
}
};

View File

@@ -0,0 +1,31 @@
<?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('user_syarikats', function (Blueprint $table) {
$table->id();
$table->integer('user_id');
$table->integer('syarikat_id');
$table->date('dt_batal')->nullable();
$table->enum('status', ['aktif','tidak']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('user_syarikats');
}
};

View File

@@ -0,0 +1,30 @@
<?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::table('users', function (Blueprint $table) {
$table->enum('role', ['awam', 'pembantu tadbir', 'pp kesihatan', 'pp tadbir', 'pegawai tadbir', 'pengarah', 'super'])->default('awam');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('role');
});
}
};

View File

@@ -0,0 +1,30 @@
<?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::table('dokumens', function (Blueprint $table) {
$table->enum('is_required', ['0', '1'])->default('0');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('is_required');
});
}
};

View File

@@ -0,0 +1,68 @@
<?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::table('lesen_penjajas', function (Blueprint $table) {
$table->string('no_akaun_lesen')->nullable();
$table->string('no_fail_lesen')->nullable();
$table->string('kod_lesen')->nullable();
$table->string('jenis_perniagaan')->nullable();
$table->enum('status_progress', ['draf', 'baru', 'menunggu bayaran proses', 'semakan bayaran proses', 'lawatan tapak', 'ulasan pegawai', 'ulasan pengarah', 'sokong dibawa ke mesyuarat', 'menunggu keputusan_mesyuarat', 'keputusan diperolehi', 'ditangguhkan'])->default('draf');
$table->enum('status_mesyuarat', ['diluluskan','ditolak','dibatalkan','ditangguhkan'])->nullable();
$table->string('kodkawasan')->nullable();
$table->string('kodtaman')->nullable();
$table->date('mulajanji')->nullable();
$table->date('tamatjanji')->nullable();
$table->date('tarikhmohon')->nullable();
$table->date('tarikhlulus')->nullable();
$table->datetime('dt_lesen_dikeluarkan')->nullable();
$table->enum('group_laporan', ['penjaja sementara','penjaja statik','penjaja berpusat'])->nullable();
$table->integer('kpi')->nullable();
$table->enum('patuh_kpi', ['0','1'])->nullable();
$table->date('lesen_dt_bayar')->nullable();
$table->string('lesen_no_resit')->nullable();
$table->double('lesen_amaun')->nullable();
$table->datetime('lesen_grab')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('lesen_penjajas', function (Blueprint $table) {
$table->dropColumn('no_akaun_lesen');
$table->dropColumn('no_fail_lesen');
$table->dropColumn('kod_lesen');
$table->dropColumn('jenis_perniagaan');
$table->dropColumn('status_progress');
$table->dropColumn('status_mesyuarat');
$table->dropColumn('kodkawasan');
$table->dropColumn('kodtaman');
$table->dropColumn('mulajanji');
$table->dropColumn('tamatjanji');
$table->dropColumn('tarikhmohon');
$table->dropColumn('tarikhlulus');
$table->dropColumn('dt_lesen_dikeluarkan');
$table->dropColumn('group_laporan');
$table->dropColumn('kpi');
$table->dropColumn('patuh_kpi');
$table->dropColumn('lesen_dt_bayar');
$table->dropColumn('lesen_no_resit');
$table->dropColumn('lesen_amaun');
$table->dropColumn('lesen_grab');
});
}
};

View File

@@ -0,0 +1,46 @@
<?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('bil_pelbagais', function (Blueprint $table) {
$table->id();
$table->enum('cara_jana', ['mylesen','epbt'])->default('epbt');
$table->integer('lesen_penjaja_id');
$table->enum('status_mylesen', ['0','1','2'])->default('2');
$table->string('status_mylesen_error')->nullable();
$table->string('ref_no')->nullable();
$table->string('description')->nullable();
$table->string('pay_status')->nullable();
$table->string('jabatan')->nullable();
$table->string('gst_rate')->nullable();
$table->string('client_key');
$table->string('ent_opr')->nullable();
$table->string('client_type')->nullable();
$table->string('status_epbt')->nullable();
$table->string('return_param')->nullable();
$table->string('no_bilpelbagai')->nullable();
$table->dateTime('dt_bayar', precision: 0);
$table->string('no_resit')->nullable();
$table->double('amaun_bayar');
$table->string('catatan')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('bil_pelbagais');
}
};

View File

@@ -0,0 +1,37 @@
<?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('bil_pelbagai_items', function (Blueprint $table) {
$table->id();
$table->integer('bil_pelbagai_id');
$table->integer('itemno');
$table->string('itemdesc');
$table->double('itemprice');
$table->string('gst_type');
$table->string('gst_code');
$table->string('cr_code');
$table->string('dr_code');
$table->string('cost_center');
$table->date('exp_date');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('bil_pelbagai_items');
}
};

View File

@@ -0,0 +1,42 @@
<?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('pbtpay_bils', function (Blueprint $table) {
$table->id();
$table->integer('client_id');
$table->double('total');
$table->string('title')->nullable();
$table->string('subjek')->nullable();
$table->string('keterangan')->nullable();
$table->string('name')->nullable();
$table->string('email')->nullable();
$table->string('mobile')->nullable();
$table->string('modul');
$table->string('jenis');
$table->double('permohonan_id');
$table->double('amount');
$table->string('noakaun')->nullable();
$table->string('nobil');
$table->enum('status_transaksi', ['baru','pending','selesai'])->default('baru');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pbtpay_bils');
}
};

View File

@@ -0,0 +1,51 @@
<?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('pbtpay_transaksis', function (Blueprint $table) {
$table->id();
$table->integer('pbtpay_bil_id');
$table->double('user_id');
$table->enum('status_transaksi',['baru','inprogress','failed','pending','abort','approved'])->nullable();
$table->integer('pm_status')->nullable();
$table->string('pm_message')->nullable();
$table->date('pm_pdate')->nullable();
$table->integer('pm_clientid')->nullable();
$table->integer('pm_clienttype')->nullable();
$table->string('pm_paymethod')->nullable();
$table->string('pm_paymodel')->nullable();
$table->integer('pm_orderid')->nullable();
$table->integer('pm_orderno')->nullable();
$table->integer('pm_paytrxid')->nullable();
$table->datetime('pm_paytrxtime')->nullable();
$table->double('pm_paytrxamt')->nullable();
$table->string('pm_paytrxbank')->nullable();
$table->string('pm_buyername')->nullable();
$table->string('pm_refno')->nullable();
$table->integer('pm_count')->nullable();
$table->string('pm_items')->nullable();
$table->integer('pm_userid')->nullable();
$table->string('pm_name')->nullable();
$table->string('pm_email')->nullable();
$table->string('pm_mobile')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pbtpay_transaksis');
}
};

View File

@@ -0,0 +1,30 @@
<?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('user_policies', function (Blueprint $table) {
$table->id();
$table->integer('user_id');
$table->enum('modul', ['penjaja','tred','anjing']);
$table->enum('akses', ['jana wang proses','pemeriksaan tapak','ulasan pegawai','ulasan pengarah','kertas kerja mesyuarat', 'keputusan mesyuarat', 'cetak lesen', 'papar laporan', 'edit permohonan', 'tambah pengguna']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('user_policies');
}
};

View File

@@ -0,0 +1,46 @@
<?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('ulasan_pegawais', function (Blueprint $table) {
$table->id();
$table->integer('lesen_penjaja_id');
$table->integer('borang_ulasan_ik_id');
$table->integer('pegawai_id')->nullable();
$table->string('pegawai_jawatan')->nullable();
$table->dateTime('dt_pegawai_ulas', precision: 0)->nullable();
$table->enum('pegawai_cadangan', ['tiada halangan','tidak menyokong', 'ditangguhkan untuk tindakan/siasatan semula'])->nullable();
$table->string('pegawai_syarat')->nullable();
$table->enum('pegawai_notis_perlu_dipatuhi', ['0','1'])->nullable();
$table->string('pegawai_tidak_menyokong_sebab')->nullable();
$table->enum('pegawai_dirujuk_unit_penguatkuasa', ['0','1'])->nullable();
$table->text('pegawai_catatan')->nullable();
$table->integer('pengarah_id')->nullable();
$table->string('pengarah_jawatan')->nullable();
$table->dateTime('dt_pengarah_ulas', precision: 0)->nullable();
$table->enum('pengarah_ulasan', ['dipertimbangkan', 'ditolak', 'ditangguhkan'])->nullable();
$table->enum('pengarah_bawa_mesyuarat', ['0', '1'])->nullable();
$table->enum('pengarah_ditolak_sebab', ['pemohon gagal mematuhi syarat', 'perniagaan dijalankan bukan seperti dipohon'])->nullable();
$table->text('pengarah_catatan')->nullable();
$table->timestamps();
});
}
/**
*
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('ulasan_pegawais');
}
};

View File

@@ -0,0 +1,30 @@
<?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('mesyuarat_pelesenans', function (Blueprint $table) {
$table->id();
$table->date('dt_mesyuarat')->nullable();
$table->string('bil_mesyuarat')->nullable();
$table->enum('kunci_senarai', ['0','1'])->default('0');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('mesyuarat_pelesenans');
}
};

View File

@@ -0,0 +1,37 @@
<?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('mesyuarat_pelesenan_lesen_penjajas', function (Blueprint $table) {
$table->id();
$table->integer('mesyuarat_pelesenan_id');
$table->integer('lesen_penjaja_id');
$table->enum('keputusan_mesyuarat', ['','meluluskan','menangguhkan','menolak'])->default('');
$table->string('by_law')->nullable();
$table->string('kodlesen')->nullable();
$table->string('kadar_lesen')->nullable();
$table->string('kadar_sampah')->nullable();
$table->string('kadar_sewa_petak')->nullable();
$table->string('kadar_patil')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('mesyuarat_pelesenan_lesen_penjajas');
}
};

View File

@@ -0,0 +1,58 @@
<?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('borang_ulasan_iks', function (Blueprint $table) {
$table->id();
$table->integer('lesen_penjaja_id');
$table->integer('pegawai_id')->nullable();
$table->dateTime('dt_rujuk_ppkp')->nullable();
$table->date('dt_periksa')->nullable();
$table->enum('kesesuaian_lokasi', ['sesuai', 'tidak sesuai'])->nullable();
$table->text('kesesuaian_lokasi_sebab')->nullable();
$table->enum('dijalankan_oleh', ['pemohon/pelesen', 'orang lain'])->nullable();
$table->enum('pematuhan_syarat', ['telah dipatuhi', 'belum dipatuhi'])->nullable();
$table->text('perkara_perlu_dipatuhi')->nullable();
$table->enum('pemprosesan_makanan', ['ada', 'tiada'])->nullable();
$table->enum('pemprosesan_makanan_memasak', ['0', '1'])->nullable();
$table->enum('pemprosesan_makanan_merebus', ['0', '1'])->nullable();
$table->enum('pemprosesan_makanan_menggoreng', ['0', '1'])->nullable();
$table->string('pemprosesan_makanan_lain')->nullable();
$table->text('pemprosesan_makanan_lain_txt')->nullable();
$table->enum('mendirikan_bangunan', ['ada', 'tiada'])->nullable();
$table->enum('jika_guna_kenderaan', ['motosikal','kereta/van','lori','basikal','lain-lain'])->nullable();
$table->string('jenis_kenderaan_lain')->nullable();
$table->string('no_plate_kenderaan')->nullable();
$table->date('dt_mula_niaga')->nullable();
$table->string('masa_berniaga_mula')->nullable();
$table->enum('kebersihan_diri', ['memuaskan', 'tidak'])->nullable();
$table->enum('kebersihan_makanan', ['memuaskan', 'tidak'])->nullable();
$table->enum('kebersihan_kawasan', ['memuaskan', 'tidak'])->nullable();
$table->text('laporan_kebersihan_selepas_niaga')->nullable();
$table->enum('cadangan', ['tiada halangan','tidak menyokong','permohonan / lesen dibatalkan kerana tamat perniagaan'])->nullable();
$table->text('tiada_halangan_syarat')->nullable();
$table->enum('tiada_halangan_notis_dipatuhi', ['0', '1'])->nullable();
$table->text('tidak_menyokong_atas_sebab')->nullable();
$table->enum('dirujuk_unit_penguatkuasa', ['0', '1'])->nullable();
$table->text('dirujuk_unit_penguatkuasa_txt')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('borang_ulasan_iks');
}
};

View File

@@ -0,0 +1,37 @@
<?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('gambar_carousels', function (Blueprint $table) {
$table->id();
$table->string('tajuk');
$table->string('keterangan', 180)->nullable();
$table->string('fail_nama'); // Contoh: slide1.jpg
$table->string('fail_path'); // Contoh: caro/slide1.jpg
$table->timestamp('tarikh_upload')->nullable();
$table->date('tarikh_mula')->nullable();
$table->date('tarikh_tamat')->nullable();
$table->unsignedBigInteger('admin_id');
$table->timestamps();
$table->foreign('admin_id')->references('id')->on('users')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('gambar_carousels');
}
};

View File

@@ -0,0 +1,33 @@
<?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('pengumumen', function (Blueprint $table) {
$table->id();
$table->string('keterangan');
$table->date('tarikh_mula_papar');
$table->date('tarikh_tamat_papar');
$table->unsignedBigInteger('admin_id');
$table->timestamps();
$table->foreign('admin_id')->references('id')->on('users')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pengumumen');
}
};

View File

@@ -0,0 +1,31 @@
<?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('grab_resit_lesens', function (Blueprint $table) {
$table->id();
$table->datetime('tarikh_grab');
$table->integer('admin_id');
$table->enum('status_grab', ['0','1'])->default('0');
$table->integer('jumlah_data');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('grab_resit_lesens');
}
};

View File

@@ -0,0 +1,28 @@
<?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('kawasans', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('kawasans');
}
};

View File

@@ -0,0 +1,29 @@
<?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('tamans', function (Blueprint $table) {
$table->id();
$table->integer('kawasan_id');
$table->string('nama');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tamans');
}
};

View File

@@ -0,0 +1,30 @@
<?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('jalans', function (Blueprint $table) {
$table->id();
$table->integer('taman_id');
$table->integer('kawasan_id');
$table->string('nama');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jalans');
}
};

View File

@@ -0,0 +1,28 @@
<?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('penempatans', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('penempatans');
}
};

View File

@@ -0,0 +1,40 @@
<?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::table('borang_ulasan_iks', function (Blueprint $table) {
$table->string('gambar1')->nullable();
$table->string('gambar1_ext', )->nullable();
$table->string('gambar2')->nullable();
$table->string('gambar2_ext')->nullable();
$table->string('gambar3')->nullable();
$table->string('gambar3_ext')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('borang_ulasan_iks', function (Blueprint $table) {
$table->dropColumn('gambar1');
$table->dropColumn('gambar2');
$table->dropColumn('gambar3');
$table->dropColumn('gambar1_ext');
$table->dropColumn('gambar2_ext');
$table->dropColumn('gambar3_ext');
});
}
};

View File

@@ -0,0 +1,30 @@
<?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::table('users', function (Blueprint $table) {
$table->string('avatar_path')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('avatar_path');
});
}
};

View File

@@ -0,0 +1,32 @@
<?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('bil_pelbagai_apis', function (Blueprint $table) {
$table->id();
$table->integer('user_id')->nullable();
$table->integer('lesen_penjaja_id')->nullable();
$table->string('tag')->nullable();
$table->boolean('status')->default(false);
$table->json('return_param')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('bil_pelbagai_apis');
}
};

View File

@@ -0,0 +1,30 @@
<?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::table('users', function (Blueprint $table) {
//
$table->string('login_epbt')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
//
$table->dropColumn('login_epbt');
});
}
};

View File

@@ -0,0 +1,36 @@
<?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::table('bil_pelbagai_apis', function (Blueprint $table) {
//
$table->after('return_param', function (Blueprint $table) {
$table->json('data_dihantar')->nullable();
$table->string('url_dihantar')->nullable();
$table->string('no_akaun_bil')->nullable();
});
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('bil_pelbagai_apis', function (Blueprint $table) {
//
$table->dropColumn('data_dihantar');
$table->dropColumn('url_dihantar');
$table->dropColumn('no_akaun_bil');
});
}
};

View File

@@ -0,0 +1,31 @@
<?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('jenis_penjajas', function (Blueprint $table) {
$table->id();
$table->string('jenis');
$table->enum('kategori', ['sementara','statik','berkenderaan']);
$table->integer('kpi');
$table->boolean('status_data')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jenis_penjajas');
}
};

View File

@@ -0,0 +1,31 @@
<?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('lesen_penjaja_histories', function (Blueprint $table) {
$table->id();
$table->integer('lesen_penjaja_id');
$table->string('nama_field');
$table->string('nilai_field');
$table->integer('changed_by');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('lesen_penjaja_histories');
}
};

View File

@@ -0,0 +1,36 @@
<?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::table('penempatans', function (Blueprint $table) {
$table->after('nama', function (Blueprint $table) {
$table->integer('kawasan_id');
$table->integer('taman_id')->nullable();
$table->integer('jalan_id')->nullable();
});
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('penempatans', function (Blueprint $table) {
$table->dropColumn('kawasan_id');
$table->dropColumn('taman_id');
$table->dropColumn('jalan_id');
});
}
};

View File

@@ -0,0 +1,34 @@
<?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::table('lesen_penjajas', function (Blueprint $table) {
// Change the 'age' column from string to integer, and keep it nullable
$table->integer('jenis_penjaja_id')->after('syarikat_id')->nullable();
$table->dropColumn('jenis');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('lesen_penjajas', function (Blueprint $table) {
// Change the 'age' column from string to integer, and keep it nullable
$table->enum('jenis', ['bukan kawasan berpusat','buah bermusim','food truck','foodtruck','car boot sale','berkenderaan','gerai','arked','pasar majlis','berpusat','sementara','lain-lain'])->after('syarikat_id')->nullable();
$table->dropColumn('jenis_penjaja_id');
});
}
};

View File

@@ -0,0 +1,29 @@
<?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('jenis_jualans', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->boolean('status_data')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jenis_jualans');
}
};

View File

@@ -0,0 +1,33 @@
<?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::table('lesen_penjajas', function (Blueprint $table) {
$table->integer('jenis_jualan_id')->after('dt_lesen_dikeluarkan')->nullable();
$table->dropColumn('jenis_perniagaan');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('lesen_penjajas', function (Blueprint $table) {
// Change the 'age' column from string to integer, and keep it nullable
$table->string('jenis_perniagaan')->nullable();
$table->dropColumn('jenis_jualan_id');
});
}
};

View File

@@ -0,0 +1,31 @@
<?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::table('bil_pelbagais', function (Blueprint $table) {
$table->boolean('status_bil')->default(true);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
Schema::table('bil_pelbagais', function (Blueprint $table) {
// Change the 'age' column from string to integer, and keep it nullable
$table->dropColumn('status_bil');
});
}
};

View File

@@ -0,0 +1,23 @@
<?php
namespace Database\Seeders;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
// User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
}
}