changes in manager and manager_employee, replaced user_id to card_id

This commit is contained in:
iIronside
2021-12-23 11:28:27 +03:00
parent ce25dc44ea
commit ac4e5d62ec
22 changed files with 2570 additions and 71 deletions

View File

@ -220,6 +220,11 @@ class UserCard extends \yii\db\ActiveRecord
return ArrayHelper::map(self::find()->all(), 'id', 'fio');
}
public function getManager()
{
return $this->hasOne(Manager::class, ['user_card_id' => 'id']);
}
public static function generateUserForUserCard($card_id = null)
{
$userCardQuery = self::find();