2018_08_01_141032_create_report_table.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateReportTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('report', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('user_id')->unsigned()->comment('举报人uid');
  17. $table->morphs('source');
  18. $table->string('subject',255)->default('')->comment('主题');
  19. $table->tinyInteger('report_type')->default(0)->comment('举报类型');
  20. $table->string('reason',255)->nullable()->comment('举报原因');
  21. $table->tinyInteger('status')->default(0)->comment('状态:0-未审核,1-已审核,4-忽略');
  22. $table->timestamps();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::dropIfExists('report');
  33. }
  34. }