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