<?php

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

class CreateLangsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('langs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->string('name');
            $table->char('slug');
            $table->boolean('flag')->default(1)->comment('是否发布');
            $table->boolean('enabled')->default(1)->comment('是否启用');
            $table->boolean('buy')->default(0)->comment('是否购买');
            $table->string('img')->nullable();
            $table->string('domain')->nullable();
            $table->integer('orders')->default(0);
            $table->timestamps();
        });
    }

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