/** * @return \yii\db\ActiveQuery */ public function getPrices() { return $this->hasMany(ProductPrice::className(), ['sale_type_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getPrice() { return $this->hasOne(ProductPrice::className(), ['id' => 'price_id']); }