2021_12_22_153152_create_receiving_tasks_table.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateReceivingTasksTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('receiving_tasks', function (Blueprint $table) {
  15. $table->id();
  16. $table->String('number')->unique()->comment('收货任务清单');
  17. $table->integer('warehouse_id')->index()->comment('仓库');
  18. $table->integer('owner_id')->index()->comment('货主');
  19. $table->String("for_single_member")->comment('投单员');
  20. $table->integer('delivery_appointment_car_id')->unique()->comment('预约号');
  21. $table->String('driver_name')->comment('司机姓名');
  22. $table->String('driver_phone')->comment('司机号码');
  23. $table->String('plate_number')->comment('车牌号');
  24. $table->String('driving_license_no')->comment('驾驶证号');
  25. $table->String('logistics_single_number')->comment('物流单号');
  26. $table->enum('provide_list',['是','否'])->comment("是否提供清单");
  27. $table->enum('receiving_type',['正常','盲收'])->comment("收货类型");
  28. $table->enum('status',['创建','进行中','完成','超时完成'])->comment('状态');
  29. $table->dateTime('end_at')->comment('完结时间');
  30. $table->timestamps();
  31. });
  32. }
  33. /**
  34. * Reverse the migrations.
  35. *
  36. * @return void
  37. */
  38. public function down()
  39. {
  40. Schema::dropIfExists('receiving_tasks');
  41. }
  42. }