2019_08_05_174208_create_areas_table.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateAreasTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('areas', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('name', 20)->comment('区域名');
  17. $table->json('area_fence')->nullable()->comment('电子围栏');
  18. $table->json('area_centre')->nullable()->comment('区域中心点坐标');
  19. $table->string('customer_service_time')->nullable()->comment('客服服务时间');
  20. $table->string('customer_service_phone')->nullable()->comment('客户服务号码');
  21. $table->tinyInteger('status')->default(1);
  22. $table->timestamps();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::dropIfExists('areas');
  33. }
  34. }