/** * @return \yii\db\ActiveQuery */ public function getVotes() { return $this->hasMany(YBoardVote::className(), ['user_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getVote() { return $this->hasOne(YBoardVote::className(), ['choice_id' => 'id']); }