<?php

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

class CreateCallRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('call_records', function (Blueprint $table) {
            $table->increments('id');
            $table->string('phone','15')->comment('电话号码');
            $table->dateTime('start_time')->comment('拨打时间');
            $table->dateTime('end_time')->comment('结束时间');
            $table->string('record_path','255')->comment('录音地址');
            $table->string('hangup_dispostion','128')->comment('挂断原因');
            $table->string('ip','32')->comment('拨打IP');

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

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