2020_05_11_103904_create_questions_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 CreateQuestionsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('questions', function (Blueprint $table) {
  15. $table->id();
  16. $table->integer('app_id')->default(0)->comment('应用平台');
  17. $table->integer('area_id')->default(0)->comment('运营区域');
  18. $table->char('mobile', 12)->nullable()->comment('用户手机号');
  19. $table->timestamp('time')->nullable()->comment('发生时间');
  20. $table->text('question')->nullable()->comment('问题');
  21. $table->char('order_no', 64)->nullable()->comment('订单号');
  22. $table->tinyInteger('status')->default(1);
  23. $table->bigInteger('admin_id')->default(0)->comment('管理员');
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('questions');
  35. }
  36. }