/** * @return \yii\db\ActiveQuery */ public function getStock() { return $this->hasOne(cats\Stock::className(), ['id' => 'stock_id']); }