<?php

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

class CreateUserThreadsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_threads', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('ower_id')->comment('线索拥有者');
            $table->integer('contact_id')->comment('联系人');
            $table->integer('company_id')->comment('企业ID');
            $table->tinyInteger('status')->nullable()->comment('线索状态');
            $table->string('remark',255)->nullable()->comment('备注');

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

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