예제 #1
0
파일: Comment.php 프로젝트: Bat-Chat/redpen
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPin()
 {
     return $this->hasOne(Pin::className(), ['id' => 'pin_id']);
 }
예제 #2
0
파일: Image.php 프로젝트: Bat-Chat/redpen
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPins()
 {
     return $this->hasMany(Pin::className(), ['image_id' => 'id']);
 }