2021_04_13_070458_create_banners_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateBannersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('banners', function (Blueprint $table) {
  15. $table->id();
  16. $table->string('name')->comment('标题');
  17. $table->string('path')->comment('地址');
  18. $table->string('shop_ids')->nullable()->comment('站点ids');
  19. $table->tinyInteger('type')->default(0)->comment('类型');
  20. $table->string('data', 500)->nullable()->comment('数据');
  21. $table->timestamp('start_time')->nullable()->comment('开始时间');
  22. $table->timestamp('end_time')->nullable()->comment('结束时间');
  23. $table->tinyInteger('status')->default(1);
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('banners');
  35. }
  36. }