-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
30 additions
and
28 deletions.
There are no files selected for viewing
21 changes: 13 additions & 8 deletions
21
databases/migrations/2024_10_31_193302_create_user_belongs_role.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
<?php | ||
|
||
use App\Model\Permission\Role; | ||
use App\Model\Permission\User; | ||
use Hyperf\Database\Schema\Schema; | ||
use Hyperf\Database\Schema\Blueprint; | ||
declare(strict_types=1); | ||
/** | ||
* This file is part of MineAdmin. | ||
* | ||
* @link https://www.mineadmin.com | ||
* @document https://doc.mineadmin.com | ||
* @contact [email protected] | ||
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE | ||
*/ | ||
use Hyperf\Database\Migrations\Migration; | ||
use Hyperf\DbConnection\Db; | ||
use Hyperf\Database\Schema\Blueprint; | ||
use Hyperf\Database\Schema\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('user_belongs_role', function (Blueprint $table) { | ||
Schema::create('user_belongs_role', static function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->bigInteger('user_id')->comment('用户id'); | ||
$table->bigInteger('role_id')->comment('角色id'); | ||
|
21 changes: 13 additions & 8 deletions
21
databases/migrations/2024_10_31_204004_create_role_belongs_menu.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
<?php | ||
|
||
use App\Model\Permission\Menu; | ||
use App\Model\Permission\Role; | ||
use Hyperf\Database\Schema\Schema; | ||
use Hyperf\Database\Schema\Blueprint; | ||
declare(strict_types=1); | ||
/** | ||
* This file is part of MineAdmin. | ||
* | ||
* @link https://www.mineadmin.com | ||
* @document https://doc.mineadmin.com | ||
* @contact [email protected] | ||
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE | ||
*/ | ||
use Hyperf\Database\Migrations\Migration; | ||
use Hyperf\DbConnection\Db; | ||
use Hyperf\Database\Schema\Blueprint; | ||
use Hyperf\Database\Schema\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('role_belongs_menu', function (Blueprint $table) { | ||
Schema::create('role_belongs_menu', static function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->bigInteger('role_id')->comment('角色id'); | ||
$table->bigInteger('menu_id')->comment('菜单id'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,11 @@ | |
* @contact [email protected] | ||
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE | ||
*/ | ||
|
||
use App\Model\Permission\Role; | ||
use App\Model\Permission\User; | ||
use Hyperf\Database\Seeders\Seeder; | ||
|
||
class UserSeeder20240926 extends Seeder | ||
class user_seeder_20240926 extends Seeder | ||
{ | ||
/** | ||
* Run the database seeds. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters