<?php

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

class CreateFormDatasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('form_data', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('status')->nullable()->default(1)->comment('状态：1未读；2已读');
            $table->unsignedInteger('student_id')->nullable()->comment('学员ID');
            $table->string('text_1', 200)->nullable()->comment('第一行文本框');
            $table->string('text_2', 200)->nullable()->comment('第二行文本框');
            $table->string('text_3', 200)->nullable()->comment('第三行文本框');
            $table->string('text_4', 200)->nullable()->comment('第四行文本框');
            $table->text('multi_text')->nullable()->comment('多行的文本框');
            $table->string('radio', 200)->nullable()->comment('单选');
            $table->string('checkbox', 200)->nullable()->comment('多选');
            $table->timestamps();
        });
    }

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