guild/frontend/modules/api/models/questionnaire/Answer.php

78 lines
1.5 KiB
PHP
Raw Normal View History

2023-10-10 15:06:01 +03:00
<?php
2023-11-16 11:55:49 +03:00
namespace frontend\modules\api\models\questionnaire;
2023-10-10 15:06:01 +03:00
/**
*
* @OA\Schema(
* schema="Answer",
* @OA\Property(
* property="id",
* type="int",
* example=1,
* description="Идентификатор ответа"
* ),
* @OA\Property(
* property="question_id",
* type="int",
* example="7",
* description="Идентификатор вопроса"
* ),
* @OA\Property(
2023-11-16 11:55:49 +03:00
* property="answer_body",
2023-10-10 15:06:01 +03:00
* type="string",
* example="Вопрос №1",
* description="Тело вопроса"
* ),
*)
*
*
* @OA\Schema(
* schema="AnswerExampleArr",
* type="array",
* example={
2023-11-16 11:55:49 +03:00
* {"id": "1", "question_id": 2, "answer_body": "Ответ 1",},
* {"id": "4", "question_id": 3, "answer_body": "Ответ 22",},
2023-10-10 15:06:01 +03:00
* },
* @OA\Items(
* type="object",
* @OA\Property(
* property="id",
* type="integer",
* ),
* @OA\Property(
* property="question_id",
* type="integer",
* ),
* @OA\Property(
2023-11-16 11:55:49 +03:00
* property="answer_body",
2023-10-10 15:06:01 +03:00
* type="string",
* ),
* ),
*)
*
*/
class Answer extends \common\models\Answer
{
2023-11-16 11:55:49 +03:00
/**
* @return string[]
*/
public function fields(): array
{
return [
'id',
'question_id',
'answer_body',
];
}
/**
* @return string[]
*/
public function extraFields(): array
{
return [];
}
2023-10-10 15:06:01 +03:00
}