コード例 #1
0
ファイル: Sale.php プロジェクト: dench/resistor
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPhotos()
 {
     return $this->hasMany(SalePhoto::className(), ['sale_id' => 'id']);
 }
コード例 #2
0
ファイル: ParseImage.php プロジェクト: dench/resistor
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPhoto()
 {
     return $this->hasOne(SalePhoto::className(), ['id' => 'photo_id']);
 }