DONE: layout letter with letterhead and footer, notification for newly...
This commit is contained in:
+33
@@ -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('membership_applications', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->string('application_number');
|
||||
$table->foreignUuid('user_id')->constrained('users')->onDelete('cascade')->nullable();
|
||||
$table->string('status');
|
||||
$table->string('board_result');
|
||||
$table->string('submitted_at');
|
||||
$table->string('completed_at');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('membership_applications');
|
||||
}
|
||||
};
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('membership_application_applicants', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->foreignUuid('membership_application_id')->constrained('membership_applications')->onDelete('cascade');
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->string('ic_number');
|
||||
$table->string('birth_date');
|
||||
$table->string('birth_place');
|
||||
$table->string('marriage_status')->comment('Belum Berkahwin, Berkahwin, Bercerai, Balu, Duda');
|
||||
|
||||
// contact information
|
||||
$table->text('address');
|
||||
$table->string('phone_number');
|
||||
$table->string('office_number')->nullable();
|
||||
$table->string('postcode');
|
||||
|
||||
// Employment
|
||||
$table->string('employer_name');
|
||||
$table->text('employer_address');
|
||||
$table->string('current_position');
|
||||
$table->date('start_work_date');
|
||||
|
||||
// contribution
|
||||
$table->decimal('stock_monthly_contribution', 10, 2);
|
||||
$table->decimal('fee_monthly_contribution', 10, 2);
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
DB::statement('
|
||||
ALTER TABLE membership_application_applicants
|
||||
ADD COLUMN gender user_gender_enum NULL
|
||||
');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('membership_application_applicants');
|
||||
}
|
||||
};
|
||||
+32
@@ -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('membership_application_heirs', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->foreignUuid('membership_application_id')->constrained('membership_applications')->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->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('membership_application_heirs');
|
||||
}
|
||||
};
|
||||
+42
@@ -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('membership_application_references', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->foreignUuid('membership_application_id')
|
||||
->constrained('membership_applications')
|
||||
->cascadeOnDelete();
|
||||
|
||||
$table->string('reference_type')->comment('PROPOSER, SUPPORTER');
|
||||
|
||||
// Applicant may select at submit; admin may fill in later
|
||||
$table->foreignUuid('user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
|
||||
// Set only when admin assigns or updates this reference
|
||||
$table->foreignUuid('assigned_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->timestamp('assigned_at')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['membership_application_id', 'reference_type']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('membership_application_references');
|
||||
}
|
||||
};
|
||||
+40
@@ -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::create('membership_application_reviews', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->foreignUuid('membership_application_id')
|
||||
->constrained('membership_applications')
|
||||
->cascadeOnDelete();
|
||||
|
||||
$table->string('stage')->comment('MANAGEMENT, BOARD');
|
||||
$table->string('decision')->comment('MANAGEMENT: APPROVED, REJECTED | BOARD: PASS, FAIL');
|
||||
$table->text('remarks')->nullable();
|
||||
|
||||
$table->foreignUuid('reviewer_id')->constrained('users')->restrictOnDelete();
|
||||
$table->timestamp('reviewed_at');
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['membership_application_id', 'stage']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('membership_application_reviews');
|
||||
}
|
||||
};
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\MembershipApplication\Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class MembershipApplicationDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// $this->call([]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user