2026_01_22_165023_create_activity_user.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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_user', function (Blueprint $table) {
  14. $table->engine = 'InnoDB';
  15. $table->id();
  16. $table->integer('activity_id')->comment('活动ID');
  17. $table->string('title', 150)->comment('活动名称');
  18. $table->string('sub_title', 150)->comment('副标题');
  19. $table->integer('start_time')->comment('开始时间');
  20. $table->integer('end_time')->comment('结束时间');
  21. $table->string('detail_image')->comment('活动详情图片');
  22. $table->tinyInteger('part_in_time')->comment('参与时间');
  23. $table->string('member_id')->comment('会员ID');
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('activity_user');
  35. }
  36. };