/**
  * @return \yii\db\ActiveQuery
  */
 public function getTransaction()
 {
     return $this->hasOne(Transaction::className(), ['id' => 'transaction_id']);
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTransactions()
 {
     return $this->hasMany(Transaction::className(), ['user_id' => 'id']);
 }
Esempio n. 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTransactions()
 {
     return $this->hasMany(Transaction::className(), ['id' => 'transaction_id'])->viaTable('transaction_product', ['product_id' => 'id']);
 }