project users, column priority

This commit is contained in:
2023-05-11 01:18:40 +03:00
parent 90eadd4830
commit b0c350efbd
7 changed files with 272 additions and 6 deletions

View File

@ -49,6 +49,10 @@ use yii\web\Linkable;
* property="columns",
* ref="#/components/schemas/ProjectColumnExample",
* ),
* @OA\Property(
* property="projectUsers",
* ref="#/components/schemas/ProjectUsersExample",
* ),
*)
*
* @OA\Schema(
@ -85,6 +89,10 @@ use yii\web\Linkable;
* property="company",
* ref="#/components/schemas/Company",
* ),
* @OA\Property(
* property="projectUsers",
* ref="#/components/schemas/ProjectUsers",
* ),
* ),
*)
*
@ -107,7 +115,7 @@ class Project extends \common\models\Project
'company' => function() {
return $this->company;
},
'projectUsers',
];
}
@ -116,6 +124,14 @@ class Project extends \common\models\Project
return ['columns',];
}
/**
* @return ActiveQuery
*/
public function getProjectUsers()
{
return $this->hasMany(ProjectUser::class, ['project_id' => 'id']);
}
public function getLinks(): array
{
return [