2019_06_05_065619_create_config_banner_table.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateConfigBannerTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('config_banner', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name', 20)->nullable()->comment('社区-banner名称');
  17. $table->integer('link_content_id')->nullable()->comment('社区-链接内容id:用户/内容/活动/话题ID');
  18. $table->string('image', 255)->nullable()->comment('社区-banner图片');
  19. $table->tinyInteger('type')->nullable()->comment('社区-banner类型:0.纯展示;1.内容;2.用户;3.活动;4.话题');
  20. $table->tinyInteger('use_background')->comment('使用后台:0.CMS;1.社区后台');
  21. $table->tinyInteger('is_open')->nullable()->comment('社区-开关状态:0:关闭;1:开启');
  22. $table->integer('tpl_id')->nullable()->comment('cms-模板ID');
  23. $table->json('rule')->nullable()->comment('cms-设置项');
  24. $table->tinyInteger('status')->nullable()->comment('cms-状态:0:草稿;1:发布');
  25. $table->tinyInteger('area_type')->nullable()->comment('cms-板块类型:0:banner;1:专题广告;2.商品楼层;3.分类专题(菜市场)');
  26. $table->timestamps();
  27. $table->softDeletes();
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. *
  33. * @return void
  34. */
  35. public function down()
  36. {
  37. Schema::dropIfExists('config_banner');
  38. }
  39. }