feat: 添加工作流

This commit is contained in:
kuaifan
2022-01-08 17:24:48 +08:00
parent 8a2571f514
commit bbd394272f
17 changed files with 1330 additions and 3 deletions
+10
View File
@@ -30,6 +30,8 @@ use Request;
* @property-read int|null $project_log_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectUser[] $projectUser
* @property-read int|null $project_user_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectFlow[] $projectFlowItem
* @property-read int|null $project_flow_item_count
* @method static \Illuminate\Database\Eloquent\Builder|Project allData($userid = null)
* @method static \Illuminate\Database\Eloquent\Builder|Project authData($userid = null, $owner = null)
* @method static \Illuminate\Database\Eloquent\Builder|Project newModelQuery()
@@ -99,6 +101,14 @@ class Project extends AbstractModel
return $this->hasMany(ProjectUser::class, 'project_id', 'id')->orderBy('id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function projectFlowItem(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany(projectFlowItem::class, 'project_id', 'id')->orderBy('sort');
}
/**
* 查询所有项目(与正常查询多返回owner字段)
* @param self $query