project Employees

This commit is contained in:
2023-05-04 01:18:24 +03:00
parent 1b8ca5b695
commit b2f482e10b
4 changed files with 142 additions and 12 deletions

View File

@ -50,6 +50,21 @@ class ManagerEmployee extends \yii\db\ActiveRecord
];
}
public function fields(): array
{
return [
'id',
'manager_id',
'employee_id',
'employee' => function () {
return [
"fio" => $this->employee->userCard->fio ?? $this->employee->username,
"avatar" => $this->employee->userCard->photo ?? '',
];
},
];
}
/**
* @return ActiveQuery
*/