Files
exchange-2.0/app/Models/Receipt.php
T
omair saleh 05401f6bbc large commit
2021-03-11 13:06:40 +08:00

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');
}
}