feat: add deposit receipt upload and admin approval/rejection workflow with SMS

This commit is contained in:
2026-11-08 13:26:28 +03:30
parent 808c272e0c
commit 885e51a79b
6 changed files with 322 additions and 3 deletions
@@ -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
{
public function up(): void
{
if (! Schema::hasTable('withdraws')) {
return;
}
Schema::table('withdraws', function (Blueprint $table) {
if (! Schema::hasColumn('withdraws', 'receipt')) {
$table->string('receipt', 500)->nullable()->after('tracked_number');
}
if (! Schema::hasColumn('withdraws', 'deposit_identifier')) {
$table->string('deposit_identifier', 50)->nullable()->after('receipt');
}
if (! Schema::hasColumn('withdraws', 'reject_reason')) {
$table->text('reject_reason')->nullable()->after('deposit_identifier');
}
});
}
public function down(): void
{
if (! Schema::hasTable('withdraws')) {
return;
}
Schema::table('withdraws', function (Blueprint $table) {
$cols = [];
if (Schema::hasColumn('withdraws', 'reject_reason')) {
$cols[] = 'reject_reason';
}
if (Schema::hasColumn('withdraws', 'deposit_identifier')) {
$cols[] = 'deposit_identifier';
}
if (Schema::hasColumn('withdraws', 'receipt')) {
$cols[] = 'receipt';
}
if ($cols !== []) {
$table->dropColumn($cols);
}
});
}
};