swagger tasks

This commit is contained in:
2023-04-26 01:22:02 +03:00
parent 226f2daa34
commit 50b9722e82
6 changed files with 242 additions and 8 deletions

View File

@ -28,6 +28,8 @@ use yii\helpers\ArrayHelper;
*/
class ProjectTask extends ActiveRecord
{
const STATUS_ACTIVE = 1;
const STATUS_DISABLE = 0;
/**
* {@inheritdoc}
*/
@ -103,6 +105,17 @@ class ProjectTask extends ActiveRecord
];
}
/**
* @return string[]
*/
public static function getStatus(): array
{
return [
self::STATUS_ACTIVE => 'Активен',
self::STATUS_DISABLE => 'Выключен'
];
}
public function beforeDelete()
{
foreach ($this->taskUsers as $taskUser) {