e29a5891c8
Reviewed-on: #5 Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com> Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
106 lines
2.5 KiB
PHP
106 lines
2.5 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class LelongBidxlaku extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'lelongbid_xlaku';
|
|
|
|
protected $fillable = [
|
|
'lelong_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 lelongbidder() {
|
|
// return $this->hasOne(LelongBidder::class,'lelongbid_id', 'id' );
|
|
// }
|
|
|
|
public function cawanganLelong()
|
|
{
|
|
return $this->hasOne(CawanganLelong::class, 'caw_id', 'caw_id');
|
|
}
|
|
|
|
// public function fileMarhunMain()
|
|
// {
|
|
// return $this->hasOne(FileMarhun::class, 'lelongbid_id')->where('photo_type', 1);
|
|
// }
|
|
|
|
// public function fileMarhunMainMany()
|
|
// {
|
|
// return $this->hasMany(FileMarhun::class, 'lelongbid_id')->where('photo_type', 1);
|
|
// }
|
|
|
|
// public function lelong()
|
|
// {
|
|
// return $this->belongsTo(Lelong::class, 'lelong_id', 'id');
|
|
// }
|
|
|
|
// public function lelongBidMarhun()
|
|
// {
|
|
// return $this->hasMany(LelongBidMarhun::class, 'lelongbid_id', 'id');
|
|
// }
|
|
|
|
// public function scanSemakSelesai()
|
|
// {
|
|
// return $this->hasMany(ScanSemak::class, 'lelongbid_id', 'id')->whereNotNull('scan_masuk');
|
|
// }
|
|
|
|
// public function pengesahan()
|
|
// {
|
|
// return $this->hasMany(Pengesahan::class, 'lelongbid_id', 'id');
|
|
// }
|
|
|
|
// public function payment()
|
|
// {
|
|
// return $this->hasOne(Payment::class, 'norujukan', 'norujukan')->where('status', 2);
|
|
// }
|
|
|
|
// public function scanSemakSelesaiJual()
|
|
// {
|
|
// return $this->hasMany(ScanSemak::class, 'lelongbid_id', 'id')->whereNotNull('serahkpdpembida');
|
|
// }
|
|
|
|
// public function lelongBidderMenang()
|
|
// {
|
|
// return $this->hasOne(LelongBidder::class, 'lelongbid_id', 'id')->where('status_bidder', 1);
|
|
// }
|
|
// public function scanjual()
|
|
// {
|
|
// return $this->belongsTo(ScanJual::class, 'id', 'lelongbid_id');
|
|
// }
|
|
}
|