2018_09_27_033157_create_notices_table.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateNoticesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('notices', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('type_id')->index()->comment('公告分类id');
  17. $table->string('title')->comment('公告标题');
  18. $table->text('content')->comment('公告内容');
  19. $table->string('tit_color')->comment('标题颜色');
  20. $table->tinyInteger('tit_b')->comment('标题加粗:0:不加粗,1:为加粗');
  21. $table->tinyInteger('is_display')->default('1')->comment('是否显示:1:显示 0:不显示');
  22. $table->string('is_url')->comment('外链')->nullable();
  23. $table->string('seo_keywords')->comment('Seo优化关键字')->nullable();
  24. $table->string('seo_description')->comment('Seo描述')->nullable();
  25. $table->integer('click')->comment('点击量');
  26. $table->unsignedInteger('sort')->comment('排序');
  27. $table->integer('subsite_id')->comment('分站id');
  28. $table->timestamps();
  29. $table->softDeletes();
  30. });
  31. }
  32. /**
  33. * Reverse the migrations.
  34. *
  35. * @return void
  36. */
  37. public function down()
  38. {
  39. Schema::dropIfExists('notices');
  40. }
  41. }