/** * 定义与tag表的关系 */ public function getTag() { return $this->hasOne(Tag::className(), ['tag_id' => 'attr_value_text']); }