swagger tasks

This commit is contained in:
apuc committed 2023-04-26 01:22:02 +03:00
1 parent 226f2daa34
commit 50b9722e82
6 files changed
+242 -8

No files matched your search

+13
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) {