PMCORE-3383

This commit is contained in:
Paula Quispe
2021-09-30 12:30:00 -04:00
parent 9f51a171c2
commit 851d992407
7 changed files with 48 additions and 13 deletions

View File

@@ -14,6 +14,7 @@ class Application extends Model
public $timestamps = false;
// Status id
const STATUS_DRAFT = 1;
const STATUS_DRAFT_NAME = 'DRAFT';
const STATUS_TODO = 2;
const STATUS_COMPLETED = 3;
const STATUS_CANCELED = 4;
@@ -52,13 +53,13 @@ class Application extends Model
* Scope for query to get the creator
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $usrUid
* @param int $usrId
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeCreator($query, $usrUid)
public function scopeCreator($query, $usrId)
{
return $query->where('APP_INIT_USER', '=', $usrUid);
return $query->where('APP_INIT_USER_ID', '=', $usrId);
}
/**
@@ -359,7 +360,7 @@ class Application extends Model
* Scope the Draft cases
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param string $user
* @param int $user
*
* @return \Illuminate\Database\Eloquent\Builder
*/