2020_10_19_113042_create_logistic_timings_table.php 1007 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use App\City;
  3. use App\Logistic;
  4. use App\LogisticTiming;
  5. use App\Province;
  6. use Illuminate\Database\Migrations\Migration;
  7. use Illuminate\Database\Schema\Blueprint;
  8. use Illuminate\Support\Facades\Schema;
  9. class CreateLogisticTimingsTable extends Migration
  10. {
  11. /**
  12. * Run the migrations.
  13. *
  14. * @return void
  15. */
  16. public function up()
  17. {
  18. Schema::create('logistic_timings', function (Blueprint $table) {
  19. $table->id();
  20. $table->integer('logistic_id')->index()->comment('承运商');
  21. $table->integer('to_province_id')->index()->comment('目的省');
  22. $table->integer('to_city_id')->index()->nullable()->comment('目的市');
  23. $table->integer('days_at_working')->nullable()->comment('工作日用日');
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('logistic_timings');
  35. }
  36. }