/** * @return \yii\db\ActiveQuery */ public function getAgent() { return $this->hasOne(WxbizAgent::className(), ['id' => 'agent_id']); }
/** * @return \yii\db\ActiveQuery */ public function getAgents() { return $this->hasMany(WxbizAgent::className(), ['role_id' => 'id']); }