64], [['item_name', 'user_id'], 'unique', 'targetAttribute' => ['item_name', 'user_id']], [['item_name'], 'exist', 'skipOnError' => true, 'targetClass' => AuthItem::className(), 'targetAttribute' => ['item_name' => 'name']], ]; } /** * {@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']); } }