/** * @return \yii\db\ActiveQuery */ public function getSources() { return $this->hasMany(Sources::className(), ['user_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getSource() { return $this->hasOne(Sources::className(), ['id' => 'source_id']); }