2026_01_27_161966_update_backflow.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::dropIfExists('backflow');
  15. Schema::create('backflow', function (Blueprint $table) {
  16. $table->engine = 'InnoDB';
  17. $table->collation = 'utf8mb4_general_ci';
  18. $table->id();
  19. $table->string('date', 32)->comment('日期');
  20. $table->string('member_id', 32)->comment('会员id');
  21. $table->decimal('recharge_amount', 10, 2)->default(0)->comment('充值金额');
  22. $table->decimal('withdrawal_amount', 10, 2)->default(0)->comment('提现金额');
  23. $table->decimal('backflow_ratio', 10, 2)->nullable()->comment('回水比例');
  24. $table->decimal('amount', 10, 2)->default(0)->comment('回水金额');
  25. $table->tinyInteger('status')->default(0)->comment('0未回水,1已回水');
  26. $table->timestamps();
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. //
  37. }
  38. };