2026_01_27_141638_create_backflow.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('backflow', function (Blueprint $table) {
  14. $table->engine = 'InnoDB';
  15. $table->id();
  16. $table->string('date', 32)->comment('日期');
  17. $table->string('member_id', 32)->comment('会员id');
  18. $table->decimal('recharge_amount', 10, 2)->default(0)->comment('充值金额');
  19. $table->decimal('withdrawal_amount', 10, 2)->default(0)->comment('提现金额');
  20. $table->decimal('backflow_ratio', 10, 2)->nullable()->comment('回水比例');
  21. $table->decimal('amount', 10, 2)->default(0)->comment('回水金额');
  22. $table->tinyInteger('status')->default(0)->comment('0未回水,1已回水');
  23. $table->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('backflow');
  34. }
  35. };