Files
lelong/app/Models/NotisBid.php
T
2023-04-17 09:24:52 +08:00

46 lines
845 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class NotisBid extends Model
{
use HasFactory;
protected $table = 'notisbid';
protected $fillable = [
'notis_id',
'caw_id',
'kodcaw',
'norujukan',
'nokp',
'jbg',
'kadarupah',
'nilaimarhun',
'pinjaman',
'bakiupah',
'berat',
'marhun',
'percent',
'fasa',
];
public function cawangan()
{
return $this->belongsTo(Cawangan::class, 'caw_id', 'id');
}
public function notis()
{
return $this->belongsTo(Notis::class, 'notis_id', 'id');
}
public function cawanganNotis(){
return $this->hasOne(CawanganNotis::class, 'caw_id','caw_id');
}
}