示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCustomers()
 {
     return $this->hasMany(Customer::className(), ['id' => 'customer_id'])->viaTable('{{%entp_customer}}', ['entrepreneur_user_id' => 'user_id']);
 }
示例#2
0
 public function getCustomername()
 {
     return $this->hasOne(\common\models\Customer::className(), ['Cus_id' => 'customer']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCustomer()
 {
     return $this->hasOne(Customer::className(), ['customer_id' => 'customer_id']);
 }
示例#4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCustomers()
 {
     return $this->hasMany(Customer::className(), ['id' => 'customer_id'])->via('reservations');
 }