<?php

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

class CreateApkUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apk_users', function (Blueprint $table) {
            $table->increments('id')->comment('自增主键');
            $table->string('name',32)->default('')->comment('员工名称');
            $table->string('password',128)->default('')->comment('密码');
            $table->string('open_id',32)->default('')->comment('开放平台ID');
            $table->string('union_id',32)->default('')->comment('企业ID');
            $table->tinyInteger('status')->default(1)->comment('状态 1=在用，0=停用');
            $table->timestamps();
            $table->softDeletes();
            $table->engine = 'InnoDB';
        });
    }

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