2026_01_22_165023_create_activity_user.php 1.1 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('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->timestamps();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('activity_user');
  34. }
  35. };