This commit is contained in:
Paula Quispe
2019-09-03 12:39:37 -04:00
parent c95280fe2a
commit 9523ab01e1
4 changed files with 186 additions and 83 deletions

View File

@@ -563,4 +563,22 @@ class Delegation extends Model
return $arrayOpenThreads;
}
/**
* Return if the user has participation in the case
*
* @param string $appUid, Case key
* @param string $userUid, User key
*
* @return boolean
*/
public static function participation($appUid, $userUid)
{
$query = Delegation::query()->select();
$query->where('APP_UID', $appUid);
$query->where('USR_UID', $userUid);
$query->limit(1);
return ($query->count() > 0);
}
}