DONE: layout letter with letterhead and footer, notification for newly...

This commit is contained in:
ISMAIL MASSERAN
2026-06-28 02:16:49 +00:00
parent 94ecbe5887
commit 034ecf947f
400 changed files with 29802 additions and 5446 deletions
@@ -0,0 +1,61 @@
<?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) {
// gender
DB::statement("
DO $$ BEGIN
CREATE TYPE user_gender_enum AS ENUM (
'Lelaki',
'Perempuan'
);
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
");
DB::statement("
ALTER TABLE users
ADD COLUMN IF NOT EXISTS gender user_gender_enum
DEFAULT NULL
");
// marriage status
$table->string('marriage_status')->nullable() ->comment('Belum Berkahwin, Berkahwin, Bercerai, Balu, Duda');
$table->integer('member_number')->nullable();
$table->string('member_type')->nullable() ->comment('Anggota, Pesara');
// join date
$table->date('join_date')->nullable();
// birth date
$table->date('birth_date')->nullable();
// birth place
$table->string('birth_place')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('gender');
$table->dropColumn('marriage_status');
$table->dropColumn('member_number');
$table->dropColumn('member_type');
$table->dropColumn('join_date');
$table->dropColumn('birth_date');
$table->dropColumn('birth_place');
});
DB::statement("DROP TYPE IF EXISTS user_gender_enum");
}
};
@@ -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('addresses', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('user_id')->constrained('users')->onDelete('cascade');
$table->string('address_type')->comment('home, office, billing')->nullable();
$table->string('address_line_1')->nullable();
$table->string('address_line_2')->nullable();
$table->string('city')->nullable();
$table->string('state')->nullable();
$table->string('postcode')->nullable();
$table->string('country')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('addresses');
}
};
@@ -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('employments', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('user_id')->constrained('users')->onDelete('cascade');
$table->string('company_name');
$table->string('job_title');
$table->string('employment_type')->comment('Permanent, Contract, Internship, Freelance');
$table->decimal('salary', 10, 2);
$table->date('start_date');
$table->date('end_date')->nullable();
$table->boolean('is_current')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('employments');
}
};
@@ -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('banks', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('name');
$table->string('code');
$table->string('swift_code')->nullable();
$table->boolean('is_active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('banks');
}
};
@@ -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('bank_details', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('user_id')->constrained('users')->onDelete('cascade');
$table->foreignUuid('bank_id')->constrained('banks')->onDelete('cascade');
$table->string('account_number');
$table->string('account_name');
$table->string('account_type')->comment('Saving, Current');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('bank_details');
}
};
@@ -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('heirs', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->foreignUuid('user_id')->constrained('users')->onDelete('cascade');
$table->string('name');
$table->string('ic_number');
$table->string('relationship')->comment('Isteri, Anak, Orang Tua, Saudara, Lain-lain');
$table->string('phone_number');
$table->text('address')->nullable();
$table->boolean('is_primary')->default(false)->comment('Primary heir');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('heirs');
}
};