2026_01_22_094348_create_activity_rewards.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. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('activity_rewards', function (Blueprint $table) {
  14. $table->engine = 'InnoDB';
  15. $table->id();
  16. $table->string('title', 150)->comment('活动名称');
  17. $table->decimal('gift_amount', 10, 2)->comment('赠送金额');
  18. $table->decimal('flow_amount', 10, 2)->comment('打码量');
  19. $table->integer('participant_count')->default(0)->comment('已参与人数');
  20. $table->integer('activity_total')->comment('活动总数量;-1表示不限量');
  21. $table->integer('maximum_participation')->comment('每人最多可参与次数;0表示不限制');
  22. $table->integer('start_time')->comment('开始时间');
  23. $table->integer('end_time')->comment('结束时间');
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('activity_rewards');
  35. }
  36. };