123456789101112131415161718192021222324252627282930313233 |
- <?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('member_benefit', function (Blueprint $table) {
- $table->id();
- $table->bigInteger('user_id')->comment('用户ID');
- $table->bigInteger('order_id')->nullable()->comment('订单ID');
- $table->bigInteger('withdraw_id')->nullable()->comment('提现ID');
- $table->tinyInteger('type')->nullable()->comment('订单类型 1-支付 2-退款 3-扣除 4-提现 5-返还 6-收益 8-赠送 9-交通费');
- $table->text('remark')->nullable()->comment('备注');
- $table->integer('benefit')->default(0)->comment('收益');
- $table->integer('balance')->default(0)->comment('余额');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('member_benefit');
- }
- };
|