M5: Workerman 常驻服务 + AI 审核/润色插件 + 支付插件(支付宝/微信/沙箱)+ 会员插件(套餐/订阅/付费文章)

This commit is contained in:
ak
2026-08-11 18:29:35 +08:00
parent f77c96d3aa
commit 1d1df43cee
52 changed files with 1914 additions and 20 deletions
@@ -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
{
public function up(): void
{
Schema::create('payments', function (Blueprint $table) {
$table->id();
$table->string('order_no', 40)->unique();
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
$table->string('subject', 255);
$table->string('description', 500)->nullable();
$table->unsignedBigInteger('amount'); // 单位:分
$table->string('channel', 20)->default('alipay'); // alipay / wechat / sandbox
$table->string('status', 20)->default('pending'); // pending / paid / failed / closed
$table->string('gateway_trade_no', 100)->nullable();
$table->json('payload')->nullable();
$table->timestamp('paid_at')->nullable();
$table->timestamps();
$table->index(['user_id', 'status']);
});
}
public function down(): void
{
Schema::dropIfExists('payments');
}
};