1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace backend\models;
- use Yii;
- /**
- * This is the model class for table "{{%auth_item_child}}".
- *
- * @property string $parent
- * @property string $child
- *
- * @property AuthItem $parent0
- * @property AuthItem $child0
- */
- class AuthItemChild extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%auth_item_child}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['parent', 'child'], 'required'],
- [['parent', 'child'], 'string', 'max' => 64],
- [['parent'], 'exist', 'skipOnError' => true, 'targetClass' => AuthItem::className(), 'targetAttribute' => ['parent' => 'name']],
- [['child'], 'exist', 'skipOnError' => true, 'targetClass' => AuthItem::className(), 'targetAttribute' => ['child' => 'name']],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'parent' => 'Parent',
- 'child' => 'Child',
- ];
- }
- /**
- * @return \yii\db\ActiveQuery
- */
- public function getParent0()
- {
- return $this->hasOne(AuthItem::className(), ['name' => 'parent']);
- }
- /**
- * @return \yii\db\ActiveQuery
- */
- public function getChild0()
- {
- return $this->hasOne(AuthItem::className(), ['name' => 'child']);
- }
- }
|