task manager

This commit is contained in:
2023-04-25 01:32:15 +03:00
parent 5508fcb1ee
commit 226f2daa34
18 changed files with 746 additions and 85 deletions

View File

@ -22,6 +22,7 @@ class ProjectColumn extends \yii\db\ActiveRecord
{
const STATUS_ACTIVE = 1;
const STATUS_DISABLE = 0;
/**
* {@inheritdoc}
*/
@ -30,6 +31,30 @@ class ProjectColumn extends \yii\db\ActiveRecord
return 'project_column';
}
/**
* @return string[]
*/
public function fields(): array
{
return [
'id',
'title',
'created_at',
'updated_at',
'project_id',
'status',
'tasks',
];
}
/**
* @return string[]
*/
public function extraFields(): array
{
return [];
}
/**
* {@inheritdoc}
*/
@ -92,4 +117,12 @@ class ProjectColumn extends \yii\db\ActiveRecord
{
return $this->hasOne(Project::className(), ['id' => 'project_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getTasks()
{
return $this->hasMany(ProjectTask::class, ['column_id' => 'id'])->with('taskUsers');
}
}