2019_08_05_171515_create_bike_troubles_table.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateBikeTroublesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('bike_troubles', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('trouble_no', 30)->comment('故障号');
  17. $table->bigInteger('user_id')->default(0)->comment('用户id');
  18. $table->bigInteger('bike_id')->default(0)->comment('车id');
  19. $table->bigInteger('area_id')->default(0)->comment('区域id');
  20. $table->string('trouble_part', 30)->comment('故障部位');
  21. $table->string('trouble_grade', 10)->comment('问题等级');
  22. $table->tinyInteger('up_trouble_type')->default(0)->comment('上报问题类型');
  23. $table->tinyInteger('fix_status')->default(0)->comment('维修状态');
  24. $table->bigInteger('fix_worker_id')->default(0)->comment('维修人员');
  25. $table->timestamp('fix_time')->nullable()->comment('维修时间');
  26. $table->string('fix_imgs')->nullable()->comment('维修现在图片');
  27. $table->string('fix_remark')->nullable()->comment('维修备注');
  28. $table->tinyInteger('status')->default(1);
  29. $table->timestamps();
  30. });
  31. }
  32. /**
  33. * Reverse the migrations.
  34. *
  35. * @return void
  36. */
  37. public function down()
  38. {
  39. Schema::dropIfExists('bike_troubles');
  40. }
  41. }