-
Notifications
You must be signed in to change notification settings - Fork 34
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
83 changed files
with
3,963 additions
and
149 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
namespace app\components\rbac; | ||
|
||
use Yii; | ||
|
||
/** | ||
* This is the model class for table "{{%auth_assignment}}". | ||
* | ||
* @property string $item_name | ||
* @property string $user_id | ||
* @property integer $created_at | ||
* | ||
* @property AuthItem $itemName | ||
*/ | ||
class Assignment extends \app\core\base\BaseActiveRecord | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public static function tableName() | ||
{ | ||
return '{{%auth_assignment}}'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function rules() | ||
{ | ||
return [ | ||
[['item_name', 'user_id'], 'required'], | ||
[['created_at'], 'integer'], | ||
[['item_name', 'user_id'], 'string', 'max' => 64] | ||
]; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function attributeLabels() | ||
{ | ||
return [ | ||
'item_name' => 'Item Name', | ||
'user_id' => 'User ID', | ||
'created_at' => 'Created At', | ||
]; | ||
} | ||
|
||
/** | ||
* @return \yii\db\ActiveQuery | ||
*/ | ||
public function getItemName() | ||
{ | ||
return $this->hasOne(AuthItem::className(), ['name' => 'item_name']); | ||
} | ||
} |
Oops, something went wrong.