<?php

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

class CreateCompanyShareholdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('company_shareholders', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('company_id')->comment('企业ID');
            $table->string('username',255)->comment('股东名称');
            $table->string('insto',10)->nullable()->comment('持股比例');
            $table->double('amount')->nullable()->comment('认缴出资(万元)');
            $table->double('amount_paid')->nullable()->comment('实缴出资(万元)');

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

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