<?php

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

class CreateResumesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('resumes', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('category_id')->index();
            $table->unsignedBigInteger('group_id')->index();
            $table->string('name');
            $table->string('cover')->nullable();
            $table->json('information')->comment('基本信息');
            $table->text('content')->nullable()->comment('简历');
            $table->string('direction')->comment('研究方向');
            $table->text('outcome')->comment('代表成果');
            $table->text('project')->comment('承担科研项目情况');
            $table->boolean('status')->default(1);
            $table->timestamps();
        });
    }

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