feat: add manual deposit system, implement Bank model, remove Docker configs, and initialize comprehensive Laravel best practice documentation for AI agents.

This commit is contained in:
pbao9
2026-05-14 16:33:35 +07:00
parent ae3b681aaa
commit 41de3744a8
73 changed files with 5397 additions and 218 deletions
@@ -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 {
public function up(): void
{
Schema::table('transactions', function (Blueprint $table) {
$table->string('type')->default('vnpay')->after('status')
->comment('vnpay: qua cổng thanh toán, manual: chuyển khoản thủ công');
});
Schema::table('customers', function (Blueprint $table) {
$table->unsignedBigInteger('total_pending')->default(0)->after('total')
->comment('Tổng tiền chờ admin duyệt (manual deposit)');
});
}
public function down(): void
{
Schema::table('transactions', function (Blueprint $table) {
$table->dropColumn('type');
});
Schema::table('customers', function (Blueprint $table) {
$table->dropColumn('total_pending');
});
}
};
@@ -0,0 +1,22 @@
<?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
{
Schema::table('transactions', function (Blueprint $table) {
$table->string('proof_image')->nullable()->after('type')
->comment('Đường dẫn ảnh chứng từ chuyển khoản do khách tải lên');
});
}
public function down(): void
{
Schema::table('transactions', function (Blueprint $table) {
$table->dropColumn('proof_image');
});
}
};
@@ -0,0 +1,27 @@
<?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
{
Schema::create('banks', function (Blueprint $table) {
$table->id();
$table->string('bank_code', 20)->comment('Mã ngân hàng VietQR (VD: MB, VCB, TCB)');
$table->string('bank_name', 100)->comment('Tên ngân hàng hiển thị');
$table->string('account_no', 50)->comment('Số tài khoản thụ hưởng');
$table->string('account_name', 200)->comment('Tên chủ tài khoản');
$table->boolean('is_active')->default(true);
$table->unsignedSmallInteger('sort_order')->default(0);
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('banks');
}
};