<?php

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

class CreateUserLaborsTable extends Migration
{
    /**
     * Run the migrations.
     *
     *临时工
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_labors', function (Blueprint $table) {
            $table->bigInteger('user_id')->unique()->comment('外键用户');
            $table->decimal('default_hour_price')->nullable()->comment('默认计时单价');
            $table->string('company')->nullable()->index()->comment('劳务所');
        });
    }

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