<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sys_region', function (Blueprint $table) {
            $table->comment('行政区划');
            $table->increments('id');
            $table->string('cityName')->default('');
            $table->integer('parentId');
            $table->string('shortName')->default('');
            $table->integer('depth');
            $table->string('cityCode')->default('');
            $table->string('zipCode')->default('');
            $table->string('mergerName')->default('');
            $table->string('longitude')->default('');
            $table->string('latitude')->default('');
            $table->string('pinyin')->default('');
            $table->unsignedInteger('isUse')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sys_region');
    }
};
