/** * @return \yii\db\ActiveQuery */ public function getMerchandises() { return $this->hasMany(Merchandise::className(), ['type' => 'id']); }