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