/** * @return \yii\db\ActiveQuery */ public function getAmounts() { return $this->hasMany(Amount::className(), ['unit_id' => 'unit_id']); }
/** * @return \yii\db\ActiveQuery */ public function getAmount() { return $this->hasOne(Amount::className(), ['amount_id' => 'amount_id']); }