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