add column description to questionnaire table

This commit is contained in:
iIronside
2023-10-26 11:37:04 +03:00
parent 93f51f39c6
commit 700f79eb5c
9 changed files with 66 additions and 27 deletions

View File

@ -15,6 +15,7 @@ use yii\helpers\ArrayHelper;
* @property int $category_id
* @property string $title
* @property int $status
* @property string $description
* @property string $created_at
* @property string $updated_at
* @property string $time_limit
@ -55,7 +56,7 @@ class Questionnaire extends ActiveRecord
[['category_id', 'status'], 'integer'],
[['created_at', 'updated_at', 'time_limit'], 'safe'],
['title', 'unique'],
[['title'], 'string', 'max' => 255],
[['title', 'description'], 'string', 'max' => 255],
['status', 'default', 'value' => true],
[['category_id'], 'exist', 'skipOnError' => true, 'targetClass' => QuestionnaireCategory::className(), 'targetAttribute' => ['category_id' => 'id']],
];
@ -70,6 +71,7 @@ class Questionnaire extends ActiveRecord
'id' => 'ID',
'category_id' => 'Категория',
'title' => 'Название анкеты',
'description' => 'Описание',
'status' => 'Статус',
'created_at' => 'Created At',
'updated_at' => 'Updated At',