47 lines
1.0 KiB
PHP
47 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Traits\Blameable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Pengeluaran extends Model
|
|
{
|
|
use HasFactory, Blameable, SoftDeletes;
|
|
|
|
protected $table = 'pengeluaran';
|
|
protected $guarded = [];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id');
|
|
}
|
|
|
|
public function jenis_kelamin()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id');
|
|
}
|
|
|
|
public function rekeningCoa()
|
|
{
|
|
return $this->belongsTo(RekeningCoa::class, 'rekening_coa_id');
|
|
}
|
|
|
|
public function rekeningCoaTransfer()
|
|
{
|
|
return $this->belongsTo(RekeningCoa::class, 'rekening_coa_transfer_id');
|
|
}
|
|
|
|
public function masterDistributor()
|
|
{
|
|
return $this->belongsTo(MasterDistributor::class, 'master_distributors_id');
|
|
}
|
|
|
|
public function masterSatuan()
|
|
{
|
|
return $this->belongsTo(MasterSatuan::class, 'master_satuans_id');
|
|
}
|
|
}
|