feat: add deposit receipt upload and admin approval/rejection workflow with SMS
This commit is contained in:
+51
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user