Update Fix
This commit is contained in:
32
app/Models/PenerimaanBarangItem.php
Normal file
32
app/Models/PenerimaanBarangItem.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user