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