<?php

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

class CreateServiceRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('service_records', function (Blueprint $table) {
            $table->increments('id');
            $table->char('lang');
            $table->string('ip')->nullable();
            $table->text('content');
            $table->unsignedTinyInteger('type')->default(1)->comment('留言类型 1 电话 2 邮箱 3 其他');
            $table->timestamps();
        });
    }

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