mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
35 lines
846 B
PHP
35 lines
846 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');
|
|
}
|
|
}
|