You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAuthsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('auths', function (Blueprint $table) {
$table->id();
$table->string('name', 20)->comment('项目名称');
$table->string('title', 20)->comment('显示标题');
$table->string('icon', 100)->default('')->comment('显示图标');
$table->integer('pid')->comment('上级ID');
$table->tinyInteger('type')->comment('1-分组 2-页面/接口');
$table->tinyInteger('check_type')->comment('1-不需要验证 2-需要验证 3-特殊验证规则');
$table->tinyInteger('show')->default(1)->comment('1-显示 2-不显示');
$table->tinyInteger('status')->default(1)->comment('1-正常 2-禁用');
$table->tinyInteger('del')->default(2)->comment('1-删除 2-正常');
$table->integer('order')->default(0)->comment('排序');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('auths');
}
}