33 lines
658 B
PHP
33 lines
658 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class PenerimaanBarangItem extends Model
|
|
{
|
|
protected $table = 'penerimaan_barang_items';
|
|
|
|
protected $fillable = [
|
|
'penerimaan_id',
|
|
'produk_id',
|
|
'unit_id',
|
|
'qty',
|
|
'qty_input',
|
|
'harga',
|
|
'unit',
|
|
'multiplier',
|
|
];
|
|
|
|
public function penerimaan(): BelongsTo
|
|
{
|
|
return $this->belongsTo(PenerimaanBarang::class, 'penerimaan_id');
|
|
}
|
|
|
|
public function produk(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Produk::class, 'produk_id');
|
|
}
|
|
}
|