<?php

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

class CreateCompanyContactsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('company_contacts', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('company_id')->comment('企业ID');
            $table->string('linkman',64)->nullable()->comment('联系人');
            $table->string('phone',32)->nullable()->comment('电话');
            $table->string('qq',32)->nullable()->comment('QQ号码');
            $table->string('email',128)->nullable()->comment('邮箱');
            $table->string('address',255)->nullable()->comment('联系地址');
            $table->string('via_website',255)->nullable()->comment('来源网站');
            $table->string('via_link',255)->nullable()->comment('来源链接');
            $table->string('remark',255)->nullable()->comment('备注');
            $table->integer('sort')->nullable()->comment('排序：越大越靠前');

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

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