Files
exchange-2.0/app/Models/Receipt.php
T
weiken.intex 4d8079c7a5 Receipt
2020-12-10 15:08:02 +08:00

28 lines
543 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\HasOne;
class Receipt extends AbstractModel
{
protected $table = 'receipt';
public function company(): HasOne
{
return $this->hasOne(Companies::class, 'company_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');
}
}