task manager
This commit is contained in:
@ -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');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user