58 lines
1.1 KiB
PHP
Executable File
58 lines
1.1 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SimulasiBid extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'simulasibid';
|
|
|
|
protected $fillable = [
|
|
'simulasi_id',
|
|
'caw_id',
|
|
'kodcaw',
|
|
'norujukan',
|
|
't_lelong',
|
|
'hargaasas',
|
|
'hargajual',
|
|
't_jual',
|
|
'nopembeli',
|
|
'jbg',
|
|
'kadarupah',
|
|
'upahsimpan',
|
|
'ansuran',
|
|
'nilaimarhun',
|
|
'pinjaman',
|
|
'bakiupah',
|
|
'cajlain',
|
|
'cajlelong',
|
|
'baki',
|
|
'berat',
|
|
'marhun',
|
|
'percent',
|
|
'status_jual',
|
|
'status_payment',
|
|
'mora_upah',
|
|
'fasa',
|
|
];
|
|
|
|
public function cawangan()
|
|
{
|
|
return $this->belongsTo(Cawangan::class, 'caw_id', 'id');
|
|
}
|
|
|
|
public function simulasi()
|
|
{
|
|
return $this->belongsTo(Simulasi::class, 'simulasi_id', 'id');
|
|
}
|
|
|
|
public function simulasiBidMarhun()
|
|
{
|
|
return $this->hasMany(SimulasiBidMarhun::class, 'simulasibid_id', 'id');
|
|
}
|
|
}
|