示例#1
0
文件: User.php 项目: nicdnepr/skidos
 public function getAffiliatePurchases()
 {
     return $this->hasMany(Purchase::className(), ['affiliate_id' => 'id']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPurchase()
 {
     return $this->hasOne(Purchase::className(), ['id' => 'purchase_id']);
 }