/** * @return \yii\db\ActiveQuery */ public function getAttributeModel() { return $this->hasOne(Attribute::className(), ['id' => 'attribute_id']); }
/** * @return \yii\db\ActiveQuery */ public function getAttributes() { return $this->hasMany(Attribute::className(), ['attribute_type_id' => 'id']); }