|
|
|
@ -29,7 +29,7 @@ return new class extends Migration |
|
|
|
|
|
|
|
Schema::create('admin_roles', function (Blueprint $table) { |
|
|
|
$table->increments('id')->comment('角色id'); |
|
|
|
$table->string('name', 50)->unique()->comment('角色名称'); |
|
|
|
$table->string('name', 50)->comment('角色名称'); |
|
|
|
$table->string('remark', 50)->comment('角色说明'); |
|
|
|
$table->integer('level')->nullable()->comment('角色级别'); |
|
|
|
$table->tinyInteger('status')->default(1)->comment('状态 0禁用 1启用'); |
|
|
|
@ -40,8 +40,8 @@ return new class extends Migration |
|
|
|
|
|
|
|
Schema::create('admin_permissions', function (Blueprint $table) { |
|
|
|
$table->increments('id')->comment('权限ID'); |
|
|
|
$table->string('name', 50)->unique()->comment('权限名称'); |
|
|
|
$table->string('slug', 50)->unique(); |
|
|
|
$table->string('name', 50)->comment('权限名称'); |
|
|
|
$table->string('slug', 50); |
|
|
|
$table->string('http_method')->nullable(); |
|
|
|
$table->text('http_path')->nullable(); |
|
|
|
$table->softDeletes(); |
|
|
|
@ -102,6 +102,8 @@ return new class extends Migration |
|
|
|
$table->unsignedBigInteger('model_id')->nullable()->comment('模型ID'); |
|
|
|
$table->string('ip')->nullable()->comment('操作IP'); |
|
|
|
$table->text('description')->nullable()->comment('操作描述'); |
|
|
|
$table->string('main_directory', 50)->nullable()->comment('主目录'); |
|
|
|
$table->string('sub_directory', 50)->nullable()->comment('副目录'); |
|
|
|
$table->json('old_values')->nullable()->comment('旧值'); |
|
|
|
$table->json('new_values')->nullable()->comment('新值'); |
|
|
|
$table->timestamps(); |
|
|
|
|