mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 03:01:06 +03:30
fix status
This commit is contained in:
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
use App\Constants\StatusTypeEnum;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Spatie\MediaLibrary\HasMedia\HasMedia;
|
||||
use App\Services\Media\HasMediaTrait;
|
||||
@@ -30,12 +31,12 @@ class Item extends Model implements HasMedia
|
||||
|
||||
public function transfers()
|
||||
{
|
||||
return $this->morphMany( 'App\Transfer' , "transferable" )->where( "status" , "approved" );
|
||||
return $this->morphMany( 'App\Transfer' , "transferable" )->where( "status" , StatusTypeEnum::APPROVED );
|
||||
}
|
||||
|
||||
public function transferActive()
|
||||
{
|
||||
return $this->morphMany( 'App\Transfer' , "transferable" )->where( "status" , "approved" )->whereNull( "to_date" );
|
||||
return $this->morphMany( 'App\Transfer' , "transferable" )->where( "status" , StatusTypeEnum::APPROVED )->whereNull( "to_date" );
|
||||
}
|
||||
|
||||
public function registerMediaCollections(): void
|
||||
|
||||
Reference in New Issue
Block a user