<?php

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

class CreateDealersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('dealers', function (Blueprint $table) {
            $table->increments('id');

            $table->string('name')->comment('名称');
            $table->string('identifier')->unique()->comment('编号');
            $table->text('description')->nullable()->comment('简称');
            $table->string('province')->nullable()->comment('省份');
            $table->string('city')->nullable()->comment('市');

            $table->string('mobile')->nullable()->comment('手机号');
            $table->string('phone')->nullable()->comment('电话');
            $table->string('fax')->nullable()->comment('传真');
            $table->string('email')->nullable()->comment('邮箱');
            $table->text('address')->nullable()->comment('地址');
            $table->string('website')->nullable()->comment('网址');
            $table->text('remark')->nullable()->comment('备注');

            $table->tinyInteger('status')->default(1)->comment('状态');

            $table->timestamps();
        });
    }

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