示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getWarehouses()
 {
     return $this->hasMany(Warehouse::className(), ['branch_id' => 'id']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getWarehouse()
 {
     return $this->hasOne(Warehouse::className(), ['id' => 'warehouse_id']);
 }
示例#3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getWarehouses()
 {
     return $this->hasMany(Warehouse::className(), ['id' => 'warehouse_id'])->viaTable('{{%product_stock}}', ['product_id' => 'id']);
 }
示例#4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getWarehouse()
 {
     return $this->hasOne(\biz\core\master\models\Warehouse::className(), ['id' => 'warehouse_id']);
 }