task manager
This commit is contained in:
@ -14,7 +14,7 @@ use yii\web\Linkable;
|
||||
* @OA\Property(
|
||||
* property="id",
|
||||
* type="int",
|
||||
* example=1,
|
||||
* example=95,
|
||||
* description="Идентификатор проекта"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
@ -45,6 +45,10 @@ use yii\web\Linkable;
|
||||
* property="company",
|
||||
* ref="#/components/schemas/Company",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="columns",
|
||||
* ref="#/components/schemas/ProjectColumnExample",
|
||||
* ),
|
||||
*)
|
||||
*
|
||||
* @OA\Schema(
|
||||
@ -100,13 +104,14 @@ class Project extends \common\models\Project
|
||||
'owner_id',
|
||||
'company' => function() {
|
||||
return $this->company;
|
||||
}
|
||||
},
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
public function extraFields(): array
|
||||
{
|
||||
return [];
|
||||
return ['columns',];
|
||||
}
|
||||
|
||||
public function getLinks(): array
|
||||
|
95
frontend/modules/api/models/ProjectColumn.php
Normal file
95
frontend/modules/api/models/ProjectColumn.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
namespace frontend\modules\api\models;
|
||||
|
||||
/**
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="ProjectColumn",
|
||||
* @OA\Property(
|
||||
* property="id",
|
||||
* type="int",
|
||||
* example=95,
|
||||
* description="Идентификатор колонки"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="title",
|
||||
* type="string",
|
||||
* example="Задачи на проверку",
|
||||
* description="Название колонки"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="project_id",
|
||||
* type="int",
|
||||
* example="95",
|
||||
* description="Проект к которому относится колонка"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="status",
|
||||
* type="int",
|
||||
* example="1",
|
||||
* description="Статус колонки"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="tasks",
|
||||
* ref="#/components/schemas/ProjectTask",
|
||||
* ),
|
||||
*)
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="ProjectColumnExample",
|
||||
* type="array",
|
||||
* example={
|
||||
* {"id": 1, "title": "Задачи на проверку", "project_id": 95, "status": 1,
|
||||
* "tasks": {
|
||||
* {"id": 95, "title": "Сложная задача", "project_id": 44, "column_id": 1, "user_id": 19, "description": "Описание задачи", "status": 1,
|
||||
* "taskUsers": {
|
||||
* {"id": 2, "task_id": 95, "user_id": 2, "fio": "Сапронов Антон Викторович", "avatar": "/profileava/m8.png"},
|
||||
* {"id": 3, "task_id": 95, "user_id": 3, "fio": "Иванов Иван Иванович", "avatar": "/profileava/m2.png"},
|
||||
* }
|
||||
* },
|
||||
* {"id": 96, "title": "Простая задача", "project_id": 44, "column_id": 1, "user_id": 19, "description": "Описание простой задачи", "status": 1,
|
||||
* "taskUsers": {
|
||||
* {"id": 3, "task_id": 96, "user_id": 3, "fio": "Иванов Иван Иванович", "avatar": "/profileava/m2.png"},
|
||||
* {"id": 4, "task_id": 96, "user_id": 4, "fio": "Петров Петр Петрович", "avatar": "/profileava/m7.png"},
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* },
|
||||
* {"id": 2, "title": "Новые задачи", "project_id": 95, "status": 1,
|
||||
* "tasks": {
|
||||
* {"id": 97, "title": "Очень Сложная задача", "project_id": 44, "column_id": 2, "user_id": 19, "description": "Описание простой задачи", "status": 1},
|
||||
* {"id": 98, "title": "Очень Простая задача", "project_id": 44, "column_id": 2, "user_id": 19, "description": "Описание очень простой задачи", "status": 1}
|
||||
* }
|
||||
* }
|
||||
* },
|
||||
* @OA\Items(
|
||||
* type="object",
|
||||
* @OA\Property(
|
||||
* property="id",
|
||||
* type="int",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="title",
|
||||
* type="string",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="project_id",
|
||||
* type="int",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="status",
|
||||
* type="int",
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="tasks",
|
||||
* ref="#/components/schemas/ProjectTask",
|
||||
* ),
|
||||
* ),
|
||||
*)
|
||||
*
|
||||
*/
|
||||
class ProjectColumn extends \common\models\ProjectColumn
|
||||
{
|
||||
|
||||
}
|
104
frontend/modules/api/models/ProjectTask.php
Normal file
104
frontend/modules/api/models/ProjectTask.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
namespace frontend\modules\api\models;
|
||||
|
||||
/**
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="ProjectTask",
|
||||
* @OA\Property(
|
||||
* property="id",
|
||||
* type="int",
|
||||
* example=95,
|
||||
* description="Идентификатор задачи"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="title",
|
||||
* type="string",
|
||||
* example="Задачи на проверку",
|
||||
* description="Заголовок задачи"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="project_id",
|
||||
* type="int",
|
||||
* example="95",
|
||||
* description="Проект к которому относится задача"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="column_id",
|
||||
* type="int",
|
||||
* example="23",
|
||||
* description="Колонка к которой относится задача"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="user_id",
|
||||
* type="int",
|
||||
* example="19",
|
||||
* description="Пользователь создавший задачу"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="description",
|
||||
* type="string",
|
||||
* example="Описание задачи",
|
||||
* description="Описание задачи"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="status",
|
||||
* type="int",
|
||||
* example="1",
|
||||
* description="Статус колонки"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="taskUsers",
|
||||
* ref="#/components/schemas/ProjectTaskUsersExample",
|
||||
* ),
|
||||
*)
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="ProjectTaskExample",
|
||||
* type="array",
|
||||
* @OA\Items(
|
||||
* type="object",
|
||||
* ref="#/components/schemas/ProjectTask",
|
||||
* ),
|
||||
*)
|
||||
*
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="ProjectTaskUsersExample",
|
||||
* type="array",
|
||||
* @OA\Items(
|
||||
* type="object",
|
||||
* @OA\Property(
|
||||
* property="id",
|
||||
* type="integer",
|
||||
* example="1"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="task_id",
|
||||
* type="integer",
|
||||
* example="1"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="user_id",
|
||||
* type="integer",
|
||||
* example="19"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="fio",
|
||||
* type="string",
|
||||
* example="Сапронов Антон Викторович"
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="avatar",
|
||||
* type="string",
|
||||
* example="/profileava/m8.png"
|
||||
* ),
|
||||
* ),
|
||||
*)
|
||||
*
|
||||
*/
|
||||
class ProjectTask extends \common\models\ProjectTask
|
||||
{
|
||||
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace frontend\modules\api\models;
|
||||
|
||||
/**
|
||||
* @OA\Schema(
|
||||
* schema="Skill",
|
||||
|
Reference in New Issue
Block a user