task users, set priority at column and task, timer entity

This commit is contained in:
2023-05-23 02:11:44 +03:00
parent c50dc189a7
commit 5da6746cc4
12 changed files with 794 additions and 8 deletions

View File

@ -52,20 +52,32 @@ namespace frontend\modules\api\models;
* "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"},
* },
* "timers": {
* {"id": 12, "created_at": "2023-04-07 02:09:42", "stopped_at": "2023-04-10 16:20:48", "user_id": 19, "entity_type": 2, "entity_id": 95, "deltaSeconds": 456, "status": 1}
* }
* },
* {"id": 96, "title": "Простая задача", "project_id": 44, "column_id": 1, "user_id": 19, "description": "Описание простой задачи", "status": 1, "comment_count": 4,
* "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"},
* },
* "timers": {
* {"id": 13, "created_at": "2023-04-08 02:09:42", "stopped_at": "2023-04-09 16:20:48", "user_id": 19, "entity_type": 2, "entity_id": 96, "deltaSeconds": 654, "status": 1}
* }
* }
* }
* },
* {"id": 2, "title": "Новые задачи", "project_id": 95, "status": 1, "priority": 2,
* "tasks": {
* {"id": 97, "title": "Очень Сложная задача", "project_id": 44, "column_id": 2, "user_id": 19, "description": "Описание простой задачи", "status": 1, "comment_count": 2},
* {"id": 98, "title": "Очень Простая задача", "project_id": 44, "column_id": 2, "user_id": 19, "description": "Описание очень простой задачи", "status": 1, "comment_count": 3}
* {"id": 97, "title": "Очень Сложная задача", "project_id": 44, "column_id": 2, "user_id": 19, "description": "Описание простой задачи", "status": 1, "comment_count": 2,
* "taskUsers": {},
* "timers": {}
* },
* {"id": 98, "title": "Очень Простая задача", "project_id": 44, "column_id": 2, "user_id": 19, "description": "Описание очень простой задачи", "status": 1, "comment_count": 3,
* "taskUsers": {},
* "timers": {}
* }
* }
* }
* },

View File

@ -80,6 +80,10 @@ namespace frontend\modules\api\models;
* property="taskUsers",
* ref="#/components/schemas/ProjectTaskUsersExample",
* ),
* @OA\Property(
* property="timers",
* ref="#/components/schemas/TimerExample",
* ),
*)
*
* @OA\Schema(

View File

@ -0,0 +1,27 @@
<?php
namespace frontend\modules\api\models;
/**
*
* @OA\Schema(
* schema="ProjectTaskUser",
* @OA\Property(
* property="user_id",
* type="int",
* example=19,
* description="Идентификатор пользователя"
* ),
* @OA\Property(
* property="task_user",
* type="int",
* example=23,
* description="Идентификатор задачи"
* ),
*)
*
*/
class ProjectTaskUser extends \common\models\ProjectTaskUser
{
}

View File

@ -0,0 +1,70 @@
<?php
namespace frontend\modules\api\models;
/**
* @OA\Schema(
* schema="Timer",
* @OA\Property(
* property="id",
* type="int",
* example=12,
* description="Идентификатор таймера"
* ),
* @OA\Property(
* property="created_at",
* type="datetime",
* example="2023-04-07 02:09:42",
* description="Дата и время создания"
* ),
* @OA\Property(
* property="stopped_at",
* type="datetime",
* example="2023-04-10 16:20:48",
* description="Дата и время остановки"
* ),
* @OA\Property(
* property="user_id",
* type="integer",
* example=19,
* description="Идентификатор пользователя"
* ),
* @OA\Property(
* property="entity_type",
* type="int",
* example=2,
* description="Идентификатор типа сущности таймера"
* ),
* @OA\Property(
* property="entity_id",
* type="int",
* example=2,
* description="Идентификатор сущности таймера"
* ),
* @OA\Property(
* property="deltaSeconds",
* type="int",
* example=547,
* description="Время между началом и завершением таймера в секундах"
* ),
* @OA\Property(
* property="status",
* type="integer",
* example="1",
* description="Статус"
* ),
*)
*
* @OA\Schema(
* schema="TimerExample",
* type="array",
* @OA\Items(
* ref="#/components/schemas/Timer",
* ),
*)
*
*/
class Timer extends \common\models\Timer
{
}