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