find()中的列别名在yii2中选择

I have 2 user_id in 2 tables and i want both idies in this query result So how can i do it?

 $ids = JobUser::find()->select('job_user.user_id AS agentId,job.user_id AS userId')
                ->join('LEFT JOIN', 'job', 'job.id = job_user.job_id')
                ->where('job_user.status="done" AND (job_user.proposed_date_time BETWEEN "'.date('Y-m-d H:i:s').'" AND "'. date('Y-m-d H:i:s', (time() + 90000)).'")')
                ->all();

how can we do colunm aliasing in yii2 through active record?

Add a public field in model with the same exact name used in alias

class yourModel extends \yii\db\ActiveRecord
{

public $agentId;  // alias 

and the proper value in attributes

and refer to this field with the alias name eg: in gridView

        'columns' => [
        ['class' => 'yii\grid\SerialColumn'],
        //'tipo',
        ['attribute' => 'agentId',    
            'label' => 'Agent ID',