mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 12:34:01 +00:00
28 lines
553 B
PHP
28 lines
553 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
|
|
|
|
|
class Receipt extends AbstractModel
|
|
{
|
|
protected $table = 'receipt';
|
|
|
|
public function transaction(): HasOne
|
|
{
|
|
return $this->hasOne(Transaction::class, 'transaction_id', 'id');
|
|
}
|
|
|
|
public function currency(): HasOne
|
|
{
|
|
return $this->hasOne(Currency::class, 'currency_id', 'id');
|
|
}
|
|
|
|
public function original_currency(): HasOne
|
|
{
|
|
return $this->hasOne(Currency::class, 'original_currency_id', 'id');
|
|
}
|
|
|
|
}
|