Exemple #1
0
 public function getAffiliatePurchases()
 {
     return $this->hasMany(Purchase::className(), ['affiliate_id' => 'id']);
 }
Exemple #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPurchase()
 {
     return $this->hasOne(Purchase::className(), ['id' => 'purchase_id']);
 }