2025_10_31_145445_create_rebates.php 1.0 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('rebates', function (Blueprint $table) {
  14. $table->id();
  15. $table->string('date')->comment('日期');
  16. $table->string('member_id')->comment('tg id');
  17. $table->decimal('betting_amount', 10, 2)->comment('投注额');
  18. $table->decimal('rebate_ratio', 10, 2)->nullable()->comment('返佣比例');
  19. $table->decimal('amount', 10, 2)->default(0)->comment('返佣金额');
  20. $table->tinyInteger('status')->default(0)->comment('0未返佣,1已返佣');
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::dropIfExists('rebates');
  32. }
  33. };