You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateAuthRuleTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('uc_auth_rule_t', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('title','20')->comment('标题');
|
|
$table->string('name','100')->comment('名称,英文唯一标识');
|
|
$table->string('method','20')->comment('请求方法');
|
|
$table->string('desc','200')->comment('描述');
|
|
$table->string('group','20')->default('')->comment('权限节点分组');
|
|
$table->string('module','20')->comment('所属模块');
|
|
$table->string('condition','200')->default('')->comment('规则附加条件');
|
|
$table->tinyInteger('status')->default(1)->comment('状态: 1 启用 2 关闭');
|
|
$table->timestamps();
|
|
$table->unique(['name', 'method', 'module']);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('uc_auth_rule_t');
|
|
}
|
|
}
|
|
|