main
Jing Li 2024-04-28 17:47:52 +08:00
parent 17e80b0d43
commit 64ad8614a8
2 changed files with 19 additions and 3 deletions

View File

@ -48,4 +48,20 @@ class WorkflowCheck extends Model
{
return $this->hasMany(WorkflowLog::class, 'check_id');
}
/**
* 是否审核通过
*/
public function isCheckSuccess(): bool
{
return $this->check_status === CheckStatus::Success;
}
/**
* 是否审核未通过
*/
public function isCheckFailed(): bool
{
return $this->check_status === CheckStatus::Fail;
}
}

View File

@ -75,15 +75,15 @@ trait HasCheckable
*/
public function isCheckSuccess(): bool
{
return $this->workflow->check_status === CheckStatus::Success;
return $this->workflow->isCheckSuccess();
}
/**
* 是否审核未通过
*/
public function isCheckFail(): bool
public function isCheckFailed(): bool
{
return $this->workflow->check_status === CheckStatus::Fail;
return $this->workflow->isCheckFailed();
}
public function canUpdate(): bool