fix request profiles
This commit is contained in:
parent
d2de940aa3
commit
5ea572e698
@ -198,8 +198,9 @@ class RequestService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$q = UserCard::find()->select('user_card.id, fio, user_card.position_id, card_skill.skill_id')
|
$q = UserCard::find()->select('user_card.id, fio, photo, position.name as position_title, user_card.position_id, user_card.level, card_skill.skill_id')
|
||||||
->leftJoin('card_skill', 'card_skill.card_id = user_card.id')
|
->leftJoin('card_skill', 'card_skill.card_id = user_card.id')
|
||||||
|
->leftJoin('position', 'user_card.position_id = position.id')
|
||||||
->where(['deleted_at' => null])
|
->where(['deleted_at' => null])
|
||||||
->andWhere(['status' => [4, 12]])
|
->andWhere(['status' => [4, 12]])
|
||||||
->andWhere(['not', ['position_id' => null]]);
|
->andWhere(['not', ['position_id' => null]]);
|
||||||
|
@ -112,8 +112,8 @@ namespace frontend\modules\api\models;
|
|||||||
* schema="RequestsProfileSearchExample",
|
* schema="RequestsProfileSearchExample",
|
||||||
* type="array",
|
* type="array",
|
||||||
* example={
|
* example={
|
||||||
* {"id": 23, "fio": "Иванов Иван Иванович", "position_id": "1", "skill_id": "1"},
|
* {"id": 23, "fio": "Иванов Иван Иванович", "photo": "/profileava/m5.png", "position_title": "Back end - разработчик", "position_id": "1", "level": "2", "skill_id": "1"},
|
||||||
* {"id": 24, "fio": "Петров Петр Петрович", "position_id": "2", "skill_id": "1"}
|
* {"id": 24, "fio": "Петров Петр Петрович", "photo": "/profileava/m2.png", "position_title": "Back end - разработчик", "position_id": "2", "level": "4", "skill_id": "1"}
|
||||||
* },
|
* },
|
||||||
* @OA\Items(
|
* @OA\Items(
|
||||||
* type="object",
|
* type="object",
|
||||||
@ -126,10 +126,18 @@ namespace frontend\modules\api\models;
|
|||||||
* type="string",
|
* type="string",
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
|
* property="photo",
|
||||||
|
* type="string",
|
||||||
|
* ),
|
||||||
|
* @OA\Property(
|
||||||
* property="position_id",
|
* property="position_id",
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* ),
|
* ),
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
|
* property="level",
|
||||||
|
* type="integer",
|
||||||
|
* ),
|
||||||
|
* @OA\Property(
|
||||||
* property="skill_id",
|
* property="skill_id",
|
||||||
* type="integer",
|
* type="integer",
|
||||||
* ),
|
* ),
|
||||||
|
Loading…
Reference in New Issue
Block a user