mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
35 lines
844 B
PHP
35 lines
844 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Classes\General\Interfaces\Transactionable;
|
|
use App\Classes\General\Traits\LogData;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
|
|
|
class Wallet extends AbstractModel implements Transactionable
|
|
{
|
|
use SoftDeletes;
|
|
use LogData;
|
|
|
|
protected $table = 'wallets';
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
|
|
*/
|
|
public function owner(): morphTo
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
/**
|
|
* @return morphMany
|
|
*/
|
|
public function transactions(): morphMany
|
|
{
|
|
return $this->morphMany(Transaction::class, 'owner');
|
|
}
|
|
}
|