<?php

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

/**
 * Migration auto-generated by Sequel Pro Laravel Export
 * @see https://github.com/cviebrock/sequel-pro-laravel-export
 */
class CreateAppInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('app_info', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('template_id')->comment('template id');
            $table->string('name', 255)->comment('小程序名称');
            $table->string('appid', 255)->comment('小程序ID');
            $table->string('appsecret', 255)->comment('小程序密钥');
            $table->integer('sort')->comment('排序号')->default(0);
            $table->enum('status', ['启用', '禁用'])->default('启用')->comment('分类状态');
            $table->nullableTimestamps();
        });
    }

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