comments entity

This commit is contained in:
2023-05-17 01:14:54 +03:00
parent b32b35540b
commit 4ae43ff2da
6 changed files with 135 additions and 6 deletions

View File

@ -56,6 +56,14 @@ namespace frontend\modules\api\models;
* ),
*)
*
* @OA\Schema(
* schema="CommentExample",
* type="array",
* @OA\Items(
* ref="#/components/schemas/Comment",
* ),
*)
*
*/
class Comment extends \common\models\Comment
{

View File

@ -48,13 +48,13 @@ namespace frontend\modules\api\models;
* example={
* {"id": 1, "title": "Задачи на проверку", "project_id": 95, "status": 1, "priority": 1,
* "tasks": {
* {"id": 95, "title": "Сложная задача", "project_id": 44, "column_id": 1, "user_id": 19, "description": "Описание задачи", "status": 1,
* {"id": 95, "title": "Сложная задача", "project_id": 44, "column_id": 1, "user_id": 19, "description": "Описание задачи", "status": 1, "comment_count": 3,
* "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,
* {"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"},
@ -64,8 +64,8 @@ namespace frontend\modules\api\models;
* },
* {"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},
* {"id": 98, "title": "Очень Простая задача", "project_id": 44, "column_id": 2, "user_id": 19, "description": "Описание очень простой задачи", "status": 1}
* {"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}
* }
* }
* },

View File

@ -71,6 +71,12 @@ namespace frontend\modules\api\models;
* description="Статус задачи"
* ),
* @OA\Property(
* property="comment_count",
* type="int",
* example="5",
* description="Кол-во комментариев"
* ),
* @OA\Property(
* property="taskUsers",
* ref="#/components/schemas/ProjectTaskUsersExample",
* ),