mirror of
https://gitee.com/ctexthuang/hyperf-micro-svc.git
synced 2026-02-08 10:20:16 +08:00
40 lines
1.5 KiB
PHP
40 lines
1.5 KiB
PHP
<?php
|
|
|
|
use Hyperf\Database\Schema\Schema;
|
|
use Hyperf\Database\Schema\Blueprint;
|
|
use Hyperf\Database\Migrations\Migration;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('admin_menu', function (Blueprint $table) {
|
|
$table->comment('后台菜单信息表');
|
|
$table->bigIncrements('id')->comment('主键');
|
|
$table->bigInteger('parent_id')->unsigned()->comment('父ID');
|
|
$table->string('name', 50)->default('')->comment('菜单名称')->unique();
|
|
$table->json('meta')->comment('附加属性')->nullable();
|
|
$table->string('path', 60)->default('')->comment('路径');
|
|
$table->string('component', 150)->default('')->comment('组件路径');
|
|
$table->string('redirect', 100)->comment('重定向地址')->default('');
|
|
$table->tinyInteger('status')->comment('状态:1=正常,2=停用')->default(1);
|
|
$table->smallInteger('sort')->comment('排序')->default(0);
|
|
$table->unsignedBigInteger('created_by')->default(0)->comment('创建人ID');
|
|
$table->unsignedBigInteger('updated_by')->default(0)->comment('更新人ID');
|
|
$table->datetimes();
|
|
$table->string('remark', 60)->comment('备注')->default('');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('admin_menu');
|
|
}
|
|
};
|