-
Notifications
You must be signed in to change notification settings - Fork 56
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
20 changed files
with
229 additions
and
100 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
use yii\db\Migration; | ||
|
||
/** | ||
* Class m190327_140741_auth_pool_field | ||
*/ | ||
class m190327_140741_auth_pool_field extends Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeUp() | ||
{ | ||
$this->addColumn('{{%admin_auth}}', 'pool', $this->string()); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeDown() | ||
{ | ||
$this->dropColumn('{{%admin_auth}}', 'pool', $this->string()); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
namespace luya\admin \models; | ||
|
||
use Yii; | ||
|
||
/** | ||
* This is the model class for table "admin_auth". | ||
* | ||
* @property int $id | ||
* @property string $alias_name | ||
* @property string $module_name | ||
* @property int $is_crud | ||
* @property string $route | ||
* @property string $api | ||
* @property string $pool | ||
* | ||
* @author Basil Suter <[email protected]> | ||
* @since 2.0.0 | ||
*/ | ||
class Auth extends \yii\db\ActiveRecord | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static function tableName() | ||
{ | ||
return '{{%admin_auth}}'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function rules() | ||
{ | ||
return [ | ||
[['alias_name', 'module_name'], 'required'], | ||
[['is_crud'], 'integer'], | ||
[['alias_name', 'module_name'], 'string', 'max' => 60], | ||
[['route', 'api'], 'string', 'max' => 200], | ||
[['pool'], 'string', 'max' => 255, 'skipOnEmpty' => true], | ||
]; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function attributeLabels() | ||
{ | ||
return [ | ||
'id' => 'ID', | ||
'alias_name' => 'Alias Name', | ||
'module_name' => 'Module Name', | ||
'is_crud' => 'Is Crud', | ||
'route' => 'Route', | ||
'api' => 'Api', | ||
'pool' => 'Pool', | ||
]; | ||
} | ||
} |
Oops, something went wrong.